×
Every problem might not have a solution right now, but don’t forget that but every solution was once a problem.
--Your friends at LectureNotes
Close

Note for Computer Network - CN By Devesh Sharma

  • Computer Network - CN
  • Note
  • 9 Views
  • Uploaded 3 months ago
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-2

P a g e |3 • ×" = • ×! ! 6. For Simplex positive acknowledgement with retransmission (PAR) protocol: 6.1. Maximum channel utilization and throughput is similar to stop-and-wait protocol when the effect of errors is ignored. 7. For Sliding Window Protocols with window size of w, 7.1. Go-Back-N, 5.3. Maximum data throughput = u 1−% , '( *'-./* ('003 4ℎ6 %'%6 '. 6. , * ≥ 2& + 1 1+2&% =# *(1−%) , '( *'-./* ./63 -/4 ('003 4ℎ6 %'%6 '. 6. , * < (1+2&)(1−%+*%) 7.1.1.Channel utilization, 7.2. Selective reject, 7.2.1.Channel utilization 2& + 1 (1 − %), '( *'-./* ('003 4ℎ6 %'%6 '. 6. , * ≥ 2& + 1 ,u =;*(1−%) , '( *'-./* ./63 -/4 ('003 4ℎ6 %'%6 '. 6. , * < 2& + 1 (1+2&) [='>6 4/ 4?&-3>'4 @ (?&>63] ≥ [A/B-. =?'% ='>6] 7.3. Condition for maximum utilization or throughput is: Throughput Calculations: Throughput = Channel Utilization × Channel Bandwidth Signal and Noise Calculations: 1. Signal to Noise Ratio (in decibels, dB) = 10logDE F , G a. where S= Signal strength and N = noise strength. HIJKLMNOOP• QRSPI , 2. Signal Attenuation (in decibels, dB) = 10logDE !PTPNUP• QRSPI Data Rate and Channel Capacity Calculations: 1. Nyquist Theorem: Maximum data rate = 2Hlog V W bits/sec, where H is bandwidth in hertz (Hz) and V is number of levels. Z 2. Shannon’s theorem: Channel capacity = X log2 Y1 + ^ bits/sec, where H is bandwidth in hertz \ (Hz). (Note: here F G is not in decibels). Baud rate: A baud is the number of changes per second in the signal. · For Manchester encoding, baud rate = 2 × bit-rate MAC Sub layer: Static channel allocation in LANs and MANs. If C = channel capacity in bps _ = arrival rate of frames (frames/sec) D ` = no. of bits per frame, then

Text from page-3

P a g e |4 Mean time to delay, T = • !−# , Now, if the channel is divided into N sub channels each with capacity each of the N channels is T’(fdm) = • − ' ( ) ( = & % $ % and arrival rate or input rate on then, % !−# Dynamic Channel Allocation: + ,-./0/12134 .5 0 5-067 = = #Δ3 , where # is the arrival rate of frames. /7189 9787-037: 18 0 ;7-1.: .5 27893ℎ Δ3 Multiple access protocol: Pure ALLOHA protocol · Infinite senders assumed. · Poisson distribution with mean rate S frames per frame time · Combined frame rate with retransmission G frames per frame time. · ‘t’ is the time required to transmit a frame. · In multiple access protocol, a frame is successful if no other frames are transmitted in the vulnerable period. · Probability of k frames being generated during a frame transmission time: ,? = · · @ A B CD ?! Hence, probability of zero frames in 2 frame periods is, ,F = 7 GH@ Therefore, for pure ALLOHA, - Mean rate I = J,0 = J7−2J which becomes maximum at G = ½, Max(S) = · • HB = 0.184 = 18.4% throughput. Vulnerability period in pure ALLOHA: For successful frame transmission, no other frame should be on the channel for vulnerability period equal to twice the time to transmit one frame. That is, NO287-0/12134 ;7-1.: Y = 23 , where t is the time to transmit one frame. M 18 P0Q7 .5 ,RST UVVWXU Slotted ALLOHA protocol · Time is divided into discrete frame slots. · A station is required to wait for the beginning of the next slot to transmit a frame. · Vulnerability period is halved as opposed to pure ALLOHA protocol. That is, · NO287-0/12134 ;7-1.: Y = 3 , where t is the time to transmit one frame. M 18 P0Q7 .5 IVWZZT[ UVVWXU Probability of k frames being generated during a frame transmission time: ,? = 7 G@ (1 − 7 G@ )?G•

Text from page-4

P a g e |5 · Hence, probability of zero frames in 1 frame period is, •• = • •• - Mean rate = !"0 = !•−! which becomes maximum at G = 1, Max(S) = · PPP · $ % = 0.368 = 36.8% throughput. Expected number of retransmission,& = •• . In Point to Point Protocol (PPP), number of channels grows as square of the number of ()*+•, -. /ℎ233•45 -, 46375 <(<•$) ;= @ .-, 3 8-*9):•,5 computers. That is, ' Binary Exponential Backoff Algorithm: · After i collisions wait a random number of slots between 0 and 2B − 1 with a maximum of 1023. (Note: After 16 collisions, failure is reported to the higher layers.) Minimum frame size for IEEE 802.3 (Ethernet) frame = 64 bytes. ROUTING ALGORITHMS Shortest Past algorithm Flooding Algorithm Flow Based Routing Algorithm, It uses the formula, STATE Non-Adaptive (or Static) Non-Adaptive (or Static) Delay time, T = Non-Adaptive (or Static) $ DE•F , where C= channel capacity, 1/G = mean packet size in bits, and H = mean number of arrivals in packets/sec Distance Vector Routing (DVR) · Based on Bellman-Ford Algorithm and the Ford-Fulkerson Algorithm. · It suffers from the “Count to infinity problem” · Exchange information of the entire network with its neighbors. Link State Routing Algorithm (LSR) · Discovers its neighbors and construct a packet telling all it has just learned and send this packet to all other routers. Hierarchical Routing Algorithm · For N router subnet, the total number of levels = ln ( · And each router will have e × ln ( number of entries in their routing tables. Broadcast Routing Algorithm Adaptive Algorithm (or non-static) Adaptive algorithm (or non-static) Adaptive Algorithm (or non-static) Adaptive Algorithm (or non-static) · Congestions deals with wires and routers while flow deals with hosts. · Traffic Shaping: · § Leaky Bucket Algorithm (If the bucket overflows, then packets are discarded). § Token Bucket Algorithm (causes a token to be generated periodically). Congestion control through Load Shedding may lead to deadlock and unfairness.

Text from page-5

P a g e |6 · The size of data portion of the datagram is = [Total length] – [size of header] · Maximum length of the datagram = 65535 bytes. Datagram format: Total length Header length Flag length Type of service Identification bits Fragment offset Time to Live Protocol version Header Checksum Source Address Destination Address · In Layer 2 of OSI model (Data link layer), destination field appears before source field where as in layer 3 (Network layer), the ordering is opposite. IP class addressing: Class Name Class A Class B Class C Class D Class E · 16 bits 4 bits 3 bits 8 bits 16 bits 13 bits 8 bits 8 bits 16 bits 32 bits 32 bits Starts with 0 10 110 1110 11110 Range 0-127 128-191 192-223 224-239 240-255 Internet addresses refer to network connections rather than hosts. (For example, Gateways have two or more network connections and each interface has its own IP address). Thus, Physical (or Ethernet) address is constant (fixed) but Network (or IP address) may change. Transport Layer: To cope with the widely varying delays, TCP maintains a dynamic estimate of the current RTT (Round Trip Time) calculated this way: · · · · When sending a segment, the sender starts a timer. Upon receipt of an acknowledgement, it stops the timer and record the actual elapsed delay M between sending the segment and receiving its acknowledgement. Whenever a new value M for the current RTT is measured, it is averaged into a smoothed RTT depending on the last measured value as follows: Ø New RTT = a (Old RTT) + (1-a)(Current RTT M), where a is known as the smoothing factor and it determines how much weight the new measurement carries. When a is 0, we simply use the new value and when a is 1 we ignore the new value. Typically, the value of a lies between 0.8 and 0.9 TCP can provide reliable service where UDP cannot as they choose to use. IP in two different modes of service provided by IP either reliable or connectionless.

Lecture Notes