Search This Blog

Saturday, 28 June 2014

CS2302 Computer Networks Unit - I (Issues in the data link layer)



Framing

        We are focusing on packet-switched networks, which means that blocks of data (called frames at this level), not bit streams, are exchanged between nodes.

        It is the network adaptor that enables the nodes to exchange frames.

        When node A wishes to transmit a frame to node B, it tells its adaptor to transmit a frame from the node’s memory. This results in a sequence of bits being sent over the link.

        The adaptor on node B then collects together the sequence of bits arriving on the link and deposits the corresponding frame in B’s memory.

        Recognizing exactly what set of bits constitute a frame—that is,

determining where the frame begins and ends—is the central challenge faced by the adaptor

To transmit frames over the node it is necessary to mention start and end of each frame. There are three techniques to solve this frame

1.     Byte-Oriented Protocols (BISYNC, PPP, DDCMP)

2.     Bit-Oriented Protocols (HDLC)

3.     Clock-Based Framing (SONET)

Byte Oriented protocols


v    To view each frame as a collection of bytes (characters) rather than bits

v     BISYNC (Binary Synchronous Communication) Protocol

o       Developed by IBM (late 1960)

v     DDCMP (Digital Data Communication Protocol)

o       Used in DECNET


Sentinel Approach

The BISYNC protocol illustrates the sentinel approach to framing; its frame format is




  • The beginning of a frame is denoted by sending a special SYN (synchronization) character.
  • The data portion of the frame is then contained between special sentinel characters: STX (start of text) and ETX (end of text).
  • The SOH (start of header) field serves much the same purpose as the STX field.
  • The frame format also includes a field labeled CRC (cyclic redundancy check) that is used to detect transmission errors.
The problem with the sentinel approach is that the ETX character might appear in the data portion of the frame. BISYNC overcomes this problem by “escaping” the ETX character by preceding it wit h a DLE (data-link-escape) character whenever it appears in the body of a frame; the DLE character is also escaped (by preceding it with an extra DLE) in the frame body. This approach is called character stuffing.

Point-to-Point Protocol (PPP)

The more recent Point-to-Point Protocol (PPP). The format of PPP frame is


  • The Flag field has 01111110 as starting sequence. 
  •  The Address and Control fields usually contain default values.
  • The Protocol field is used for demultiplexing. It defines the high level protocol such as IP or IPX (protocol developed by Novell).
  • The frame payload size can he negotiated, but it is 1500 bytes by default.
  • The PPP frame format is unusual in that several of the field sizes are negotiated rather than fixed.
  • Negotiation is conducted by a protocol called LCP (Link Control Protocol).
  • LCP sends control messages encapsulated in PPP frames such messages are denoted by an LCP identifier in the PPP Protocol.

Byte-Counting Approach

The number of bytes contained in a frame can he included as a field in the frame header. DDCMP protocol is used for this approach. The frame format is

  • COUNT Field specifies how many bytes are contained in the frame’s body. 
  • Sometime count field will be corrupted during transmission, so the receiver will accumulate as many bytes as the COUNT field indicates. This is sometimes called a framing error. 
  • The receiver will then wait until it sees the next SYN character.

Bit-Oriented Protocols (HDLC)

In this, frames are viewed as collection of bits. High level data link protocol is used. The format is


  • HDLC denotes both the beginning and the end of a frame with the distinguished bit sequence 01111110.
  • This sequence might appear anywhere in the body of the frame, it can be avoided by bit stuffing.
  • On the sending side, any time five consecutive 1’s have been transmitted from the body of the message (i.e., excluding when the sender is trying to transmit the distinguished 01111110 sequence), the sender inserts a 0 before transmitting the next bit.
  • On the receiving side, five consecutive 1’s arrived, the receiver makes its decision based on the next bit it sees (i.e., the bit following the five is).
  • If the next bit is a 0, it must have been stuffed, and so the receiver removes it. If the next bit is a 1, then one of two things is true, either this is the end-of-frame marker or an error has been introduced into the bit stream. 
  • By looking at the next bit, the receiver can distinguish between these two cases:
a.   If it sees a 0 (i.e., the last eight bits it has looked at are 01111110), then it is the end-of- frame marker.

b.   If it sees a 1 (i.e., the last eight bits it has looked at are 01111111), then there must have been an error and the whole frame is discarded.

 
Clock-Based Framing (SONET)

  • Synchronous Optical Network Standard is used for long distance transmission of data over optical network.
  • It supports multiplexing of several low speed links into one high speed links.
  • An STS-1 frame is used in this method.

 

  • It is arranged as nine rows of 90 bytes each, and the first 3 bytes of each row are overhead, with the rest being available for data.
  • The first 2 bytes of the frame contain a special bit pattern, and it is these bytes that enable the receiver to determine where the frame starts.
  • The receiver looks for the special bit pattern consistently, once in every 810 bytes, since each frame is 9 x 90 = 810 bytes long.



  • The STS-N frame can he thought of as consisting of N STS-1 frames, where the bytes from these frames are interleaved; that is, a byte from the first frame is transmitted, then a byte from the second frame is transmitted, and so on. 
  • Payload from these STS-1 frames can he linked together to form a larger STS-N payload, such a link is denoted STS-Nc. One of the bits in overhead is used for this purpose.
 



Friday, 27 June 2014

CS2302 Computer Networks Unit - I (Channel Access on links)




UNIT I


Network architecture – layers – Physical links – Channel Access on links– Hybrid multiple access techniques – Issues in the data link layer –Framing – Error correction and detection – Link-level flow control


Channel Access on links

·       Channel access on links is a multiple access method where the available bandwidth of a link is shared in time, frequency or by code between different stations to make efficient use of high-speed telecommunications lines.

·       Some form of multiplexing is used for multiple-access method.

·       Various multiple access techniques are

1.     Frequency Division Multiple Access (FDMA)

2.     Time Division Multiple Access (TDMA)

3.     Code Division Multiple Access (CDMA)

Frequency Division Multiple Access


·       Frequency-division multiple access (FDMA), the available bandwidth is divided into frequency bands.

·       Each station is allocated a band to send its data.

·       Each frequency band is reversed for a specific station that band belongs to the station all the time.

·       FDMA is a data link layer protocol that uses FDM at the physical layer.


Fig: Frequency division multiplexing
 



Time Division Multiple Access


·      Time division multiplexing is possible when the achievable data rate of the medium exceeds the data rate of digital signals to be transmitted.

·      In time-division multiple access (TDMA), the entire bandwidth is one channel. All the stations share the bandwidth of the channel in time.
·      Each station is allocated a time slot during which it can send data.

·      The main problem with TDMA lies in achieving synchronization between the different stations.

  • Each station needs to know the beginning of its slot and the location of its slot.



Fig: Time division multiplexing


Code Division Multiple Access


·       CDMA differs from FDMA because only one channel occupies the entire bandwidth of the link.

·       It differs from TDMA because all stations can send data at the same time without timesharing.

·       CDMA simply means communication with different codes used with spread spectrum based on coding theory.

·       Each station is assigned a code, which is a sequence of numbers called chips.

·       We start with data signal with rate D. where called as bit data rare.

·       We break each bit into k chips according to a fixed pattern that is specific to each user, called the user’s code.
·       The new channel has a chip data rate of KD chips per seconds.

 

Fig: code division multiplexing



Specifications of a simple type checker



The type of each identifier must be declared before the identifier is used. The type checker is a translation scheme that synthesizes the type of each expression from the type of its sub-expressions.
P --> D; E
D--> D; D | id: T
T--> char | integer | array[num] of T | * T
E--> literal | num | id | E mod E | E[E] | E*
Base Types: char, integer, type-error

Translation Scheme
P --> D; E
D--> D;D
D--> id :T { addtype(id.entry,T.type);}
T--> char {T.type= char;}
T--> integer {T.type=integer;}
T-->*T_1 {T.type=pointer(T_1.type);}
T--> array[num] of T_1 { T.type =array(1..num.val,T_1.type); }

Type Checking of Expressions

E--> literal { E.type=char;}
E--> num { E.type =integer;}
E--> id { E.type =lookup(id.entry);}
E--> E_1 mod E_2 { E.type =If (E_1.type ==integer)  if (E_2. Type ==integer) integer; else type-error;
E--> E_1[E_2] { E.type=if ((E_2.type==integer)&& (E_1.type==array(s,t)) t; else type-error;}
E--> *E_1 { E.type = if (E_1.type ==pointer(t)) t else type-error;

Type Checking for Statements

S--> id=E { if (id.type==E.type) void; else type-error;}
S--> if E then S { if (E.type==boolean) S_1.type; else type-error;}
S--> While E do S { if (E.type==boolean) S_1.type; else type-error; 
S--> S; S; { if (S_1.type==void) if (S_2.type ==void) void; else type-error;}

Type Checking of Functions

E--> E(E)
T--> T ‘->’ T { T.type = T1.type -> T2.type}
E--> E(E) {E.type = I f ((E_2.type ==s) && (E_1.type == s--> t)) t; else type-error;

CS2302 Computer Networks Unit - I (Physical links)



UNIT I


Network architecture – layers – Physical links – Channel Access on links– Hybrid multiple access techniques – Issue s in the data link layer –Framing – Error correction and detection – Link-level flow control



LINKS


·       All practical links rely on some sort of electromagnetic radiation propagating through a medium or, in some cases, through free space

·       One way to characterize links, then, is by the medium they use

Typically copper wire in some form (as in Digital Subscriber Line (DSL) and coaxial cable),

Optical fiber (as in both commercial fiber-to-the home services and many long-distance links in the Internet’s backbone), or

  Air/free space (for wireless links)

·       Another important link characteristic is the frequency

Measured in hertz, with which the electromagnetic waves oscillate

·       Distance between the adjacent pair of maxima or minima of a wave measured in meters is called wavelength

  Speed of light divided by frequency gives the wavelength.

Frequency on a copper cable range from 300Hz to 3300Hz; Wavelength for 300Hz wave through copper is speed of light on a copper / frequency

  2/3 x 3 x 108 /300 = 667 x 103 meters.

·       Placing binary data on a signal is called encoding.

·       Modulation involves modifying the signals in terms of their frequency, amplitude, and phase. 


Fig: Electromagnetic spectrum
 

CABLES

 If the nodes you want to connect are in the same room, in the same building, or even on the same site (e.g., a campus), then you can buy a piece of cable and physically string it between the nodes. Exactly what type of cable you choose to install depends on the technology you plan to use to transmit data over the link. Eg: twisted pair, coaxial, fiber optical 

                                         
                                        Common types of cables and fibers available for local links.



LEASED LINES

·    If the two nodes you want to connect are on opposite sides of the country, or even across town, then it is not practical to install the link yourself.
  • Your only option is to lease a dedicated link from the telephone company.


                                                Common bandwidths available from the carriers.





LAST-MILE LINKS

  • If you can’t afford a dedicated leased line—they ra nge in price from roughly a thousand dollars a month for a cross-country DS1 link
  • If you have to ask, you can’t afford it
  • Then there are less expensive options available. We call these “last-mile” links
  • They span the last mile from the home to a network service provider.

These services are summarized below in Table


                                             Common services available to connect your home.
 
 


POTS (plain old telephone service)

  • Uses conventional modem
  • Transmits data at 56 Kbps over a standard voice-grade line for less than a hundred dollars 

 ISDN (Integrated Services Digital Network)

  • An ISDN connection includes two 64-Kbps channels, one that can be used to transmit data and another that can be used for digitized voice.
  • A device that encodes analog voice into a digital ISDN link is called a CODEC, for coder/decoder
  • When the voice channel is not in use, it can be combined with the data channel to support up to 128 Kbps of data bandwidth.
  
XDSL (DIGITAL SUBSCRIBER LINE)

  • Collection of technologies that are able to transmit data at high speeds over the standard twisted pair lines
  
ADSL (ASYMMETRIC DIGITAL SUBSCRIBER LINE)

  • ADSL provides a different bandwidth from the subscriber to the telephone company’s central office (upstream) than it does from the central office to the subscriber (downstream).
  • The exact bandwidth depends on the length of the line running from the subscriber to the central office. This line is called the local loop.
  • Downstream bandwidths range from 1.544 Mbps (18,000 feet) to 8.448 Mbps (9000 feet). 
  • Upstream bandwidths range from 16 Kbps to 640 Kbps.

 



VDSL (VERY HIGH DATA RATE DIGITAL SUBSCRIBER LINE)

  • Data rates ranging from 12.96 Mbps to 55.2 Mbps.
  • VDSL runs over much shorter distances—1000 to 4500 feet— which means that not typically reach from the home to the central office.
  • The telephone company would have to put VDSL transmission hardware in neighborhoods, with some other technology (e.g., STS-N running over fiber) connecting the neighborhood to the central office, this is sometimes called “fiber to the neighborhood”





CABLE TV (CATV)

  • CATV channels are made available for transmitting digital data, where a single CATV channel has a bandwidth of 6 MHz.
  • The technology is currently able to achieve 40 Mbps downstream on a single CATV channel, with 100 Mbps as the theoretical capacity.

  • The upstream rate is roughly half the downstream rate (i.e., 20 Mbps) due to a 1000-fold decrease in the signal-to-noise ratio.