Networks Quiz 3

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

1-persistent CSMA

1. Before sending frame, sense channel 2. If channel is busy, continue sensing until channel becomes idle 3. If channel is idle, transmit with probability 1

Non-persistent CSMA

1. Before sending frame, sense channel 2. If channel is busy, stop sensing channel, wait random time period and go to step 1 3. If channel is idle, transmit with probability 1

p-persistent CSMA

1. Before sending frame, sense channel 2. If channel is busy, wait till next time slot and go to step 1 3. If channel is idle, transmit at beginning of time slot with probability p (defer TX till next time slot with probability 1-p). Repeat until frame is transmitted or someone else starts transmitting 4. If someone else starts transmitting, treat as collision = wait random back off time and go to step 1

To minimize collisions

1. Carrier Sensing 2. If no carrier, then channel is idle, start Tx 3. Collision detection: while transmitting, listen for collisions 4. If collision detected, halt transmission, enter recovery mode

Ethernet's Collision Recovery Algorithm

1. Continue TX until min packet time 2T is reached to ensure all receivers detect collision 2. If (TX attempts > max allowed attempts) abort TX and report failure to upper layer 3. If (TX attempts <= max attempts allowed) increment TX attempts, calculate backoff period and wait period, go to step 1 of transmitter algorithm

Ethernet Transmission: Multicast

1. Sender inserts a 1 in LSb of the MSB of the destination address, other 47 bits hold rest of 6-byte MAC address of the multicast group (all addresses have 01 as first byte) 2. Frame is sent after populating all header and body fields 3. All hosts on Ethernet can receive frame but a host accepts only if its MAC address matches address in frames dest field or host is in promiscuous mode

Ethernet Transmission: Broadcast

1. Sender inserts all 1s in Dest Addr field in Ethernet frame header 2. Frame is sent after populating all header and body fields 3. All hosts on Ethernet receive AND accept the frame

Ethernet Transmission: Unicast

1. Sender inserts destination's MAC address in dest field in Ethernet frame header 2. Frame is sent after populating all header and body fields 3. All hosts on Ethernet can receive frame but a host accepts only if its MAC address matches address in frames dest field or host is in promiscuous mode

Stop-and-Wait protocol

1. Sender starts frame timer when sending F1 2. If receiver's ACK to F1 arrives before frame timer expires, F1 was successfully Tx and sender transmits F2 3. If ACK to F1 does not arrive before frame timer expires, sender assumes F1 was lost and retransmits

Ethernet's Transmitter Algorithm

1. Sense for carrier, if busy continue sensing 2. When channel is free, wait a further time period equal to the inter-frame gap (IFG), now start transmitting and continue sensing for collisions 3. If collision is detected, send 32 bit jamming sequence and execute collision recovery algorithm 4. If TX ends, and no collision detected, we are done

10 Base T

10 = bandwidth in Mbps, Base = baseband signaling, T = UTP (F = fiber, 2 = 200 m, 5 = 500 m)

Ethernet Max Allowed Attempts

16

Overflow

2 positive nums result in negative or vice versa

Ethernet Addressing

6-byte address: First 3 bytes are manufacturer's code prefix, last 3 are card number assigned by manufacturer. Hex representation separated by :

Ethernet's Binary Exponential Backoff Algorithm

After collision time is divided into discrete but unsynchronized slots 1. After n failed attempts, the delay selected is one from 2^n available slots. k*51.2, k = {0, ..., (2^n - 1)}

Cyclic Redundancy Check (CRC)

Append CRC bits on data for error checking

Continuous Time Channel

Asynchronous = no slot clock, TX is asynchronous and can commence at any time

ARQ

Automatic Repeat Request - uses timers and positive ACKs for reliable transmission

Carrier Sensing

Before transmitting, listen for carrier signal on channel

Piggybacking of ACKs

Bi-directional communication- host A sends data to host B, if host B has data to send to host A it sends the ACK along with the data

CSMA/CD

Carrier Sense Multiple Access/Collision Detection - all hosts in same collision domain

What errors does 2-D parity catch?

Catches all odd number of bit errors, doesn't catch powers of two if in a square or rectangle

Ethernet

Communication protocol = IEEE 803.2

Checksum Analysis

Computationally efficient, wasteful because it requires large file size. Weak protection

Checksum: Sender

Compute sum of all data words, transmit computed checksum along with original data in DL trailer

T(x)

Data bits + CRC bits

Type

Demultiplexing key - indicates what higher level protocol to hand off the data to IPv4 = 4 ICMP = 1

G(x)

Divisor polynomial of degree k (k < n)- given

Sliding Window: Receiver

Drop frames outside window, accept arriving non-duplicate frames falling within window; send ACK for received frame with the highest in-order sequence num. Roll window down by 1 immediately after sending ACK for top frame in window

Checksum: Receiver

Extract checksum from frame, independently compute checksum on received data and compare. If they don't match reject frame

Preamble

Helps receiver to sync, manchester encoding, ends in 11 in case bits are lost/gained

Transmit with probability 1

In continuous time, transmit immediately. In slotted time, transmit at start of next slot period

LAF

Largest acceptable frame = last sequence num in window

LAR

Last ACK received = sequence num immediately before window

LFR

Last frame received = sequence num immediately before window

LFS

Last frame sent = last sequence number in window

NACKs

Negative ACKnowlegmenet to notify receiver when error occurs

How to make T(x) perfectly divisible by G(x)

P(x) = x^k * M(x) Get remainder R(x) of P(x)/G(x) using mod-2 division T(x) = P(x) - R(x)

Odd parity

Parity bit = 0 means even number of 1's

Even parity

Parity bit = 0 means odd number of 1's

2-D Parity

Parity bits and 8 bit parity byte for vertical columns

Frame Format

Preamble (64), Dest Addr (48), Src Addr (48), Type (16), Body (46-1500 bytes), CRC (32)

RWS

Receive Window Size

SWP with Finite Sequence Nums

Receiver can receive duplicate frames without knowing- to resolve make SWS <= (MaxSequenceNum + 1)/2

SWS

Sending Window Size

CRC hardware

Shift register represents G(x) - XOR's where coefficient is a 1, shift in P(x) MSB first

What if SWS = 1?

Stop and wait protocol

Slotted Time Channel

Synchronous = TX occurs in equal-duration slots, transmitters and receivers synchronize at slot edges, frame transmissions initiated only at slot beginnings

Sliding Window: Sender

Transmit frames that are within window, slide down 1 after ACK is received for top frame in window

What if RWS = SWS/2

check in notes not sure


Kaugnay na mga set ng pag-aaral

COMS 351 - Communication Theory - Chapters 5-9

View Set

Chapter 6: Emotional and Social Development in Infancy and Toddlerhood

View Set

2-2: lok at tha hekken canges in da state

View Set

Bio II Section 3 Homework Questions

View Set

Module 1231 : Chirurgie et soins périopératoires

View Set