Komunikasi Data DATA LINK FLOW CONTROL

Heri Wijayanto,ST.,MT. heriwijayanto.wordpress.com

Jurusan Teknik Elektro Fakultas Teknik Universitas Mataram

Multipoint Link

Jaringan komputer tidak hanya membahas point to point tetapi kebanyakan multipoint link Satu titik sebagai primary dan yang lain sebagai secondary Primary bertanggungjawab untuk memulai pertukaran data. Select dan Poll

SELECT & POLL

POLL

Primary request data dari secondary Primary memiliki data untuk dikirim dan menginformasikan ke secondary bahwa data akan datang

SELECT

POLL SEQUENCE Primary Primary Secondary Secondary Poll t0 t1 t2 t3 NACK t4 t5 Poll DATA Terminal terpilih tdk memiliki data Terminal terpilih memiliki data ACK .

SELECT SEQUENCE Primary Primary Secondary Secondary SEl ACK Sel+Data DATA ACK ACK Fast select .

Timing  Poll terminal terpilih tdk mempunyai data      TN=tprop+tpoll+tproc+tnack+tprop TN=2tprop+tpoll+tproc+tnack TN=waktu total untuk terminal terpilih yang tidak memiliki data tprop = waktu propagasi: t1-t0 = t5-t4 tproc = waktu untuk memproses poll   Tp=3tprop+tpoll+tack+tdata+2tproc Tp=TN+tprop+tdata+tproc .

Mekanisme Flow control yang sudah umum digunakan adalah Stop and Wait dan Sliding window.FLOW CONTROL     Menjamin penerima tidak kualahan dlm menerima data. . Pengirim tidak terlalu lambat sehingga tidak efisien Diatur/dikelola oleh Data Link Control (DLC) atau biasa disebut sebagai Line Protocol.

FLOW CONTROL 1 Time 1 Transmitter departure times Transmitter departure times Receiver arrival times 2 3 4 2 3 4 5 (a) Error free transmission 5 (b) Transmission with loses and error  Gambar 3.5 Diagram waktu flow control saat transmisi tanpa kesalahan (a) dan saat terjadi kehilangan paket dan terjadi kesalahan (b) Receiver arrival times .

karena dia menyediakan untuk transmisi data dalam dua arah. Pendekatan stop and wait adalah sesuai untuk susunan transmisi half duplex. . tetapi hanya dalam satu arah setiap saat. Stop and wait flow control Protokol ini memiliki karakteristik dimana sebuah pengirim mengirimkan sebuah frame dan kemudian menunggu acknowledgment sebelum memprosesnya lebih lanjut.FLOW CONTROL 1.

Algoritma Stop and wait flow control 1. Pengirim kirim frame dan tunggu konformasi dari penerima Penerima terima kiriman frame dan kirim konfirmasi Kalau pengiriman belum selesai kembali ke langkah 1  Bagaimana algoritma ini menangani frame yang hilang. 3. 2. duplikasi frame atau ack yg hilang? .

Alasan data dibagi dalam frame  Pengiriman data terlalu besar membutuhkan waktu transmisi yang lama  Jika terjadi kesalahan harus mengirim kembali semua data   Dlm jaringan dihindari satu titik menguasai jalur transmisi dalam waktu yg lama Ukuran buffer di penerima terbatas .

Timing SnW Flow Control        TD = Ti + nTF Ti = waktu memulai rangkaian(Inisialisasi) TF = Waktu mengirim 1 frame Ti = tprop+tpoll+tproc TF = tprop+tframe+tproc+tprop+tack+tproc Karena Ti kecil maka diabaikan TD = n(2tprop+tframe) . n jumlah frame .

n 4 3 2 Flow control Message 1 Station A Ev ent 1 Station B Other Messages awaiting transmission n 4 3 2 n 4 3 2 ACK or NAK Station A Ev ent 3 Station B Line is idle Station A Ev ent 2 Station B Message 1 checked f or Errors .

Utilisasi SnW FC  .

12 .8 .       a = waktu_propagasi/waktu_transmisi a = (d/V)/(L/R) = Rd/VL d = jarak V = 3 x 108 m/s L = panjang frame R = pesat data Contoh      Waktu propagasi = 270 ms R = 56 kbps L = 4000 bit/frame Waktu transmisi = 4000/56000 = 71 ms a = 3. U = 0.

Stop and Wait .

Sehingga bila a kurang dari 1.dan penundaan perambatan {waktu yang diambil bit untuk melintas dari pengirim ke penerima}.waktu perambatan lebih sedikit dibanding waktu transmisi.Stop and Wait  Pada gambar diatas.Ditunjukkan sebagai variabel a. .waktu trasnmisi {waktu yang dipergunakan station untuk mentransmisikan frame} dinormalkan ke satu.

SLIDING WINDOW Flow control   Dalam SnW FC jika a>1  tidak efisien Dikirim beberapa Frame sekaligus tanpa mengunggu ack.   Setiap frame diberi label untuk mempertahankan track Penerima memberi ack termasuk urutan frame berikutnya .

4 3 Flow control Message in T ransit 4 3 2 0 Station A ACK 1 1 Message 1 Checked for Errors and ACKed Station B Message 0 was Previously ACKed 7 6 5 2 1 Message Awaiting ACK/NAK (a) Message in T ransit 0 5 7 6 4 Station A 3 3 Message Awaiting ACK/NAK Message Awaiting T ransmission NAK 3 Station B 2 Message 3 Checked for Errors and ACKed 5 4 1 Messages was Previously ACKed (b) Gambar Sliding window data link control .

Sliding window flow control .

.

pengirim harus menahan frame-frame ini bila mereka harus ditransmisikan kembali.dalam gambar ini.Sliding window flow control  Dari gambar diatas merupakan cara yang terbaik untuk menggambarkan proses jendela penggeseran / sliding window.Seandainya dipergunakan urutan nomor 3-bit.dan tiap balasan diterima. jendela yang diarsir menjadi menyusut.dimulai dengan frame 0.jendela yang diarsir mengembang. . Frame diantara garis vertikal dan jendela yang diarsir telah dikirim namun belum dibalas. sehingga frame-frame tersebut diberi nomor yang berurutan dari 0 sampai 7.Kotak persegi panjang yang diarsir menunjukkan frame yang dikirim.Tiap frame dikirim.pengirim mentransmisikan lima frame. Sebagaimana yang kita lihat.lalu nomor yang sama digunakan kembali untuk frame berikutnya.

Utilisasi Sliding Window  .

Komunikasi Data DATA LINK ERROR CONTROL Heri Wijayanto.ST.com Jurusan Teknik Elektro Fakultas Teknik Universitas Mataram ..wordpress.MT. heriwijayanto.

Transmission Error Control    All transmission media have potential for introduction of errors All data link layer protocols must provide method for controlling errors Error control process has two components   Error detection Error correction 25 .

Error Control in Networks There are two types of errors associated with networks.   Human errors. controlled by the network There are two categories of network errors.   Corrupted data (that have been changed) Lost data 26 . controlled by application programs Network errors.

What are Network Errors? Network errors are a fact of life in data communications networks. Dial-up lines are more prone to errors because they have less stable parameters. more than one data bit is changed by the error-causing condition. 27 . regardless of error rate statistics.   In a burst error. Normally errors occur in bursts. Errors are not uniformly distributed.

001. It is 8 times of the bit error rate. 28 . it also means that one character made up of 8bit is not correct. However. The character error rate becomes 1/125.Network Error  One bit error in 1000 bits results in an error rate of 0.

or I’ll ki** you. I h*ve a p*ncil in my p*cket  I have a *e**il in my pocket  Give me your *oney.Network Error The fact that errors tend to be clustered in bursts rather than evenly dispersed is both good and bad:   Good: long period error-free transmission Bad: it is more difficult to recover the data from the errors.  29 .

Error Correction  A receiver that detects an error simply asks the sender to retransmit the message until it is received without error. 30 .   Lost frame Damaged frame Error detection Positive acknowledgment (ACK) Negative acknowledgment and retransmission (NAK) Retransmission after time-out  Responses are:      Secara kolektif mekanisme-mekanisme diatas disebut “Automatic Repeat Request(ARQ).

Protokol Error Control    Stop and Wait ARQ Go Back N ARQ Selective Reject ARQ .

.

.

heriwijayanto.MT..com Jurusan Teknik Elektro Fakultas Teknik Universitas Mataram .ST.Komunikasi Data DATA LINK MEDIUM ACCESS CONTROL Heri Wijayanto.wordpress.

dll Secara Umum dapat dikategorika sec synchronous atau asynchronous . kompleksitas.Kontrol Akses Media   Parameter : dimana dan bagaimana Dimana : terpusat/terdistribusi   Terpusat : stasiun yang akan mengirim data menunggu izin dari controller Terdistribusi : secara dinamis ditentukan   Bagaimana : topologi. unjukkerja.

Synchronous n Asynchronous  Synchronous    Circuit Switching Synchronous FDM (frequency division multiple access) Synchronous TDM Round Robin/bergantian Reservsation/pemesanan tempat Contention/berebutan  Asynchronous    .

 Round Robin : Untuk topologi bus dan ring   Token Bus Token Ring   Reservation : DQDB  bus Contention :CSMA/CD .

1. slots 2.5.6 idle 5: DataLink Layer 5-38 .4 have pkt.Channel Partitioning MAC protocols: TDMA TDMA: time division multiple access     access to channel in "rounds" each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle example: 6-station LAN.3.

6 idle frequency bands 5: DataLink Layer 5-39 .Channel Partitioning MAC protocols: FDMA FDMA: frequency division multiple access     channel spectrum divided into frequency bands each station assigned fixed frequency band unused transmission time in frequency bands go idle example: 6-station LAN.5. frequency bands 2.4 have pkt.3. 1.

g. via delayed retransmissions) slotted ALOHA ALOHA CSMA. CSMA/CA 5: DataLink Layer 5-40  Examples of random access MAC protocols:    .Random Access Protocols  When node has packet to send   transmit at full channel data rate R.. no a priori coordination among nodes   two or more transmitting nodes ➜ “collision”. CSMA/CD. random access MAC protocol specifies:   how to detect collisions how to recover from collisions (e.

all nodes detect collision Operation  when node obtains fresh frame. it transmits in next slot  no collision. p until success 5: DataLink Layer 5-41 .Slotted ALOHA Assumptions  all frames same size  time is divided into equal size slots. node can send new frame in next slot  if collision. time to transmit 1 frame  nodes start to transmit frames only at beginning of slots  nodes are synchronized  if 2 or more nodes transmit in slot. node retransmits frame in each subsequent slot with prob.

wasting slots  idle slots  nodes may be able to detect collision in less than time to transmit packet  clock synchronization 5-42 5: DataLink Layer .Slotted ALOHA Pros  single active node can continuously transmit at full rate of channel  highly decentralized: only slots in nodes need to be in sync  simple Cons  collisions.

each with many frames to send    Suppose N nodes with many frames to send. each transmits in slot with probability p prob that node 1 has success in a slot = p(1-p)N-1  For max efficiency with N nodes.37 At best: channel  prob that any node has a success = Np(1-p)N-1 5: DataLink Layer used for useful transmissions 37% of time! 5-43 .Slotted Aloha efficiency Efficiency is the long-run fraction of successful slots when there are many nodes. find p* that maximizes Np(1-p)N-1 For many nodes. take limit of Np*(1-p*)N-1 as N goes to infinity. gives 1/e = .

t0+1]  collision probability increases:  5: DataLink Layer 5-44 . no synchronization when frame first arrives  transmit immediately frame sent at t0 collides with other frames sent in [t0-1.Pure (unslotted) ALOHA   unslotted Aloha: simpler.

.18 5: DataLink Layer 5-45 . (1-p)N-1 .p0] infty . (1-p)2(N-1) P(no other node transmits in [p0-1. P(no other node transmits in [p0-1.p0] . = p . (1-p)N-1 = p .. … choosing optimum p and then letting n -> Even worse ! = 1/(2e) = .Pure Aloha efficiency P(success by given node) = P(node transmits) .

CSMA (Carrier Sense Multiple Access) CSMA: listen before transmit: If channel sensed idle: transmit entire frame  If channel sensed busy. defer transmission  Human analogy: don’t interrupt others! 5: DataLink Layer 5-46 .

CSMA collisions collisions can still occur: propagation delay means two nodes may not hear each other’s transmission spatial layout of nodes collision: entire packet transmission time wasted note: role of distance & propagation delay in determining collision probability 5: DataLink Layer 5-47 .

deferral as in CSMA   collisions detected within short time colliding transmissions aborted.CSMA/CD (Collision Detection) CSMA/CD: carrier sensing. compare transmitted. received signals difficult in wireless LANs: receiver shut off while transmitting 5: DataLink Layer 5-48  collision detection:   . reducing channel wastage easy in wired LANs: measure signal strengths.

CSMA/CD collision detection

5: DataLink Layer

5-49

“Taking Turns” MAC protocols
channel partitioning MAC protocols:

share channel efficiently and fairly at high load inefficient at low load: delay in channel access, 1/N bandwidth allocated even if only 1 active node! efficient at low load: single node can fully utilize channel high load: collision overhead 5: DataLink Layer

Random access MAC protocols

5-50

“Taking Turns” MAC protocols
Polling:  master node “invites” slave nodes to transmit in turn  concerns:

 

Token passing:  control token passed from one node to next sequentially.  token message  concerns:
  

polling overhead latency single point of failure (master)

token overhead latency single point of failure (token)

5: DataLink Layer

5-51

hard in others (wireless)  CSMA/CD used in Ethernet  CSMA/CA used in 802. by time. S-ALOHA. Frequency Division  Random partitioning (dynamic). CSMA.11   Taking Turns  polling from a central site. CSMA/CD  carrier sensing: easy in some technologies (wire). token passing 5: DataLink Layer 5-52 . ALOHA.Summary of MAC protocols  What do you do with a shared media?  Channel Partitioning. frequency or code  Time Division.

Komunikasi Data DATA LINK CONTROL PROTOCOL Heri Wijayanto.com Jurusan Teknik Elektro Fakultas Teknik Universitas Mataram .wordpress.ST..MT. heriwijayanto.

Data Link Control Protocols     Asynchronous protocols High-level Data Link Control (HDLC) Ethernet and Token Ring SLIP and PPP 54 .

Asynchronous Transmission Start-stop transmission is a least efficient technology. We need to bundle bytes to reach high efficiency transmissions. 55 .

Asynchronous FTP XMODEM FORMAT STX 1 byte Packet# compliment 1 byte Message 128 bytes Checksum 1 byte Packet # 1 byte 56 .

Asynchronous FTP KERMIT     developed by Columbia University support a variety of different packet sizes and error detection methods typically 1000bytes/packet with CRC-24 and adjustable during transmission uses both stop-and-wait ARQ and continuous ARQ 57 .

The start and end of each packet sometimes is marked by adding synchronization characters (SYN) at the start/end of each packet.Synchronous Transmission With Synchronous Transmission all the letters or data in one group of data is transmitted at one time as a block of data called a frame or packet. 58 .

Synchronous Transmission There are many protocols for synchronous transmission that fall into three broad categories:    Byte-oriented Bit-oriented Byte-count 59 .

HDLC accepts the data and delivers it to the higher level application layer Both modules exchange control information.High-Level Data Link Control (HDLC)      The OSI’s data link protocol A bit-oriented protocol On transmitting side. HDLC receives data from an application. and delivers it to the receiver on the other side of the link On the receiving side. encoded into a frame (IBM’s SDLC has similar features and the format of HDLC) 60 .

HDLC Frame Structure     Flag: 01111110.or 32-bit CRC  Control: purpose or function of frame    Information frames: contain user data Supervisory frames: flow/error control (ACK/ARQ) Unnumbered frames: variety of control functions (see p. at start and end Address: secondary station (for multidrop configurations) Information: the data to be transmitted Frame check sequence: 16.131) 61 .

Bit Stuffing  62 . Add a 0 after every five 1s at sender side and delete the 0 at receiver side. the character “01111110” will confuse the receiver.  Solution .Transparency Problem  The problem of transparency  Because HDLC uses 01111110 to mark the start and end of a packet.

HDLC Operation    Initialization: S-frames specify mode and sequence numbers. U-frames acknowledge Data Transfer: I-frames exchange user data. S-frames acknowledge and provide flow/error control Disconnect: U-frames initiate and acknowledge 63 .

Ethernet (IEEE 802.3) Ethernet (IEEE 802. It uses contention media access control. and Xerox in the 1970s. Ethernet has no transparency problem because it does not use number of bytes to delineate the message. CRC-32 frame check.      It is a byte-count protocol. The address is 6-byte The maximum length of the message is 1492 bytes.3) was conceived by Bob Metcalfe in 1973 and developed jointly by Digital. 64 . Intel. Therefore.

.

3) format Destination address 6 bytes Source address Length 6 bytes 2 bytes Message variable CRC-32 4 bytes Token Ring (IEEE802.Frame Formats Ethernet (IEEE802.5) format Start delimiter Frame control Destination address Source address Message variable End delimiter Access control 1 byte Frame check sequence 4 bytes 66 .

67 . and later became a formal standard of the IEEE.   The size of the message field is generally limited to 4500 bytes The frame check sequence is 32-bit CRC code. It uses a controlled access media access protocol.Token Ring Token Ring (IEEE 802.5) was developed by IBM in the early 1980s.   It is a byte-oriented protocol Does not suffer the same transparency problems as SDLC  Each token ring frame starts and ends with special electrical signal produced in a manner different from any other pattern of bits.

  SLIP suffers the transparency problem because it uses “11000000” as END. It is developed in 1980s. Compressed SLIP (CSLIP) uses compression to reduce the amount of data transmitted. 68 . with a ESC + “11011101”. it replaces the character in the message with “11011001” (ESC) + “11011100”.Serial Line Internet Protocol  Serial Line Internet Protocol (SLIP) is a byteoriented protocol designed to connect two computers using Internet protocols over a point-topoint telephone line. This trick is also used for ESC character itself. So.

Message length is up to 1500 bytes.     The packet begins and ends with a flag “01111110”. Therefore. it suffers the transparency problem. 69 . CRC-16 for error control Supports network layer protocols other than just Internet protocol.Point-to-Point Protocol  Point-to-Point Protocol (PPP) is a byte-oriented protocol developed in 1990s as a replacement for SLIP.

Packet Formats of SLIP and PPP SLIP packet layout End 1 byte Message variable End 1 byte PPP packet layout Flag Address Control 1 byte 1 byte 1 byte Message variable CRC-16 Flag 2 bytes 1 byte 70 .

TERIMAKASIH .

Sign up to vote on this title
UsefulNot useful