CSCI357 - Final (only new content)

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/60

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

61 Terms

1
New cards

Node

host or router

2
New cards

Link

channel between nodes

3
New cards

L2 Packet

Frame

4
New cards

L2’s Role

Move datagrams across some physical link to an adjacent neighbor

5
New cards

L2 Services

  • framing

  • channel access

  • reliable delivery

  • flow control

  • error handling

  • half or full duplex communication

6
New cards

L2 Services - framing

adds headers and trailers which signify the end of transmission. Needed in case of noise

7
New cards

L2 Services - channel access

if shared medium → determines who’s using in order to avoid collision.

8
New cards

L2 Services - flow control

prevents overflow of buffers

9
New cards

L2 Services - Reliable Delivery

  • Also happens w/ TCP and transport layer

  • Good for high error links → prevent trip to transport layer

10
New cards

L2 Services - err handling

  • retrans on err detection

  • tries to err correction to avoid retrans

11
New cards

What tends to cause L2 transmission errors?

Noise or attenuation

12
New cards

L2 Services - Half or full duplex communication

  • bidirectional data flow

  • Half duplex - only one host can send at a time

  • Full duplex - simultaneous two-way communication

13
New cards

Where is L2 Implemented?

  • At the router/hosts

  • some sw/hw/fw in the network adaptor (NIC)

14
New cards

Network Sending Adaptor

  • encapsulates the L3 datagram

  • provides/adds L2 services

15
New cards

Network Receiving Adaptor

  • handles services

  • passes datagram to L3

16
New cards

Bit Errors

  • This is what error detection and correction is for

  • 1’s and 0’s getting corrupted in transmission

17
New cards

Error Detection - Parity Bit

  • append 1 bit per word to have even # of 1’s

  • Will be able to detect 1-bit errors in a word, but not which bit

  • this is purely error detection

18
New cards

Error Correction - 2D Parity

  • have one parity bit per row and column

  • allows for detection and correction but more overhead

  • detects isolated single bits

19
New cards

Reality of Errors

  • they are bursty

  • tend to not happen in isolation but in groups

20
New cards

Cyclic Redundancy Check (CRC)

  • choose a polynomial generator G of degree n

  • we are looking to find a remainder R (bit size r) from data D

  1. Sender shifts the data by r bits

  2. divides shifted data by G

  3. adds that remainder to the shifted data

  4. Recv divides whole msg by G, if 0 → valid data, corrupt if else

  • can detect up to n bit error bursts

21
New cards

Reed-Solomon Codes

  • error correction method

  • k bytes → k coefficients

  • k coefficients determine the polynomial, but n = k + t are provided.

  • Detect up to t errors

  • correct up to t/2 errors

  • correct up to t erasures

22
New cards

Point-to-Point Link

Direct private connection between two endpoint

23
New cards

Broadcast Links

  • anything sent on the link will go to everyone connected

  • lots of simultaneous signals → interference

24
New cards

Collision

When a node receives multiple signals simultaneously

25
New cards

MAP - Distributed Algorithms

  • This is the ideal vision

  • All communication is done on the channel

  • ideally with link rate R and M nodes → transmit at R/M

  • decentralized

  • simple

26
New cards

MAP - Time Division Multiple Access

  • each node has a time frame to send during

  • requires connected nodes to by synched up

  • if node doesn’t have anything to send → time slot wasted

27
New cards

MAP - Frequency Division Multiple Access

  • Allocate bands of frequency to each node

  • speeds get really slow the more nodes connected

28
New cards

MAP - Random Access

  • Just try to send at the full rate R whenever node has data

  • protocol needs to specify collision detection and recovery

29
New cards

MAP - Slotted ALOHA

  • Random Access protocol

  • assumes nodes are sync’d and frames equal size

  • timeslots are the size of a frame

  • Just try to send during a time slot → assumes everyone knows if there’s a collision before end of slot

  • if collision → retry at the next time slot with a prob of P

  • easy to implement but makes a lot of assumptions and inefficient

30
New cards

MAP - Pure ALOHA

  • just transmit whenever ready

  • no need to sync

  • performs even worse than slotted

31
New cards

Carrier Sense Multiple Access (CSMA)

  • listen to channel → only send if no one is talking

  • collision still possible → prop delay - if someone starts talking in the time it takes to check → collision

  • smaller dprop → smaller collision window

32
New cards

CSMA + CD - Wired

  • only send if no one is talking

  • create frame → carrier sense → send and monitory → if collision → immediately stop transmitting → send jam signal to alert others + binary exponential backoff

33
New cards

MAP - Polling

  • Taking turn MAP

  • Have central controller in charge or inviting devices to transmit

34
New cards

MAP - Polling - pros

  • keeps non-controller devices simple

  • no time lost on idle devices

  • no collisions

35
New cards

MAP - Polling - cons

  • single point of failure (controller)

  • latency - need to wait for everyone to be given a chance (bad for single senders)

  • overhead

36
New cards

MAP - Token Passing Protocol

  • Have a token ring that’s required for a device to talk

  • has a max transmissions before needing to pass

37
New cards

MAP - Token Passing Protocol - pros

  • no collisions

  • no need to go back to controller (little time lost on idle devices)

38
New cards

MAP - Token Passing Protocol - cons

  • token becomes single point of failure

  • overhead from token passing

39
New cards

MAP types

  • channel partitioning: time, frequency, code

  • random access: handle collisions

  • taking turns: decides who talks

40
New cards

L2 addressing

  • MAC/LAN/Ethernet addrs

  • not hierarchical

  • set in the hardware/firmware

  • addrs are unique within LAN

41
New cards

How to send within LAN?

given IP addr, need MAC addr → ARP

42
New cards

Address Resolution Protocol (ARP)

  • protocol used for facilitating communication w/in LAN

  • each node in LAN as an ARP table to store IP to MAC mappings

43
New cards

ARP - process

  • if node’s ARP table doesn’t have entry →

  • broadcast ARP query →

  • target node recv broadcast & replies →

  • cache reply info

44
New cards

ARP - table entries

(IP, MAC, TTL)

45
New cards

ARP - Broadcast ARP

used when a node’s ARP table doesn’t have IP MAC mapping

contains:

  • TO: FF:FF:...:FF

  • FROM: src MAC

  • Who has: target IP

  • Tell: src IP

46
New cards

How to send outside LAN?

  • Initial sender knows IP addr of dest and IP addr of next hop to B

  1. Create datagram

    1. src IP

    2. dest IP

  2. Frame it

    1. src MAC

    2. dst MAC of next hop

  3. Transmit

  4. Rcvr removes datagram and does forwarding lookup → encapsulates in new frame

47
New cards

LAN topology - Bus

  • multiple nodes one wire

  • any node connected to same wire → collision domain

  • popular in 90s

<ul><li><p>multiple nodes one wire</p></li><li><p>any node connected to same wire → <strong>collision domain</strong></p></li><li><p>popular in 90s</p></li></ul><p></p>
48
New cards

Collision Domain

  • arises because of Bus LAN topology

  • any node connected to the same wire whose transmissions can collide

49
New cards

LAN Topology - Star

  • central switch

  • one wire per node from central switch

<ul><li><p>central switch </p></li><li><p>one wire per node from central switch </p></li></ul><p></p>
50
New cards

Ethernet Frames

knowt flashcard image
51
New cards

Ethernet Frame - type field

This will typically indicate IPv4, IPv6, ARP, or packet length

52
New cards

Ethernet Frame - Preamble

  • 8 bytes of alternating 10 w/ 1 on each end

  • wakes up the recv and syncs clock rates

53
New cards

Ethernet properties

  • Connectionless: no ACKs or handshakes

  • Unreliable: if corruption → drop pack, let L3 handle

54
New cards

Ethernet Hub

  • more like a repeater

  • makes star topology possible by broadcasting incoming frames to all ports

  • generates a lot of traffic

55
New cards

Ethernet switch

  • stores and forwards ethernet frames

  • reads L2 hdr and forwards selectively to output link using CSMA/CD if necessary

  • self-learning: observes traffic to build switching table, if dest ever unknown → flood

56
New cards

Ethernet switch vs routers

  • both store and forward and use forwarding tables

  • differ

  • L2 vs L3 hdrs

  • flooding/learning/MAC addrs vs routing algs

57
New cards

Attack models

  • Goal of these attacks is to recover the key

  • if you have the key → you can decrypt everything

58
New cards

Cipher-text only Attack

  • Attack model

  • only have the cipher c

  • just use statistical analysis to break (look for common letters etc.)

  • most difficult

59
New cards

Known-plaintext Attack

  • attack model

  • if you have both c and m

  • this can happen if attacker knows data is a pdf/known standard for what the message starts with → can reverse engineer

60
New cards

Chosen Plaintext attack

  • attack model

  • “encryption oracle”

  • when attacker has access to feed m into encryptor → test for patterns to learn key structure

61
New cards

Side-channel attack - Timing Attack

  • attack the hardware rather than deducing keys/encryptor

  • CPU takes diff amount of time to measure 0 v 1 → time the CPU to guess the bits