Skip to content
/ PA2 Public

CSEE W4119 Computer Networks Programming Assignment 2 - Network Protocols Emulation

Notifications You must be signed in to change notification settings

kamu-49/PA2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PA2: CSEE W4119 Computer Networks Programming Assignment 2 - Network Protocols Emulation

PART1: GBN

Ideas

  • create a function that checks if a timer has already been set
    • use it in both the sender and receiver function
    • should have a function that turns off the timer whenever a packet is received.
    • starts again when realizes there are still packets waiting to be received
      • keep in mind of the scenario where the first "next"packet is sent but there are still packets awaiting a receive. the timer still restarts with these packets as well once the ACK is received.
        • can have the timer "restart" when the buffer is recognized as not empty. once the buffer is empty the clock is completely wiped.
    • once the timeout happens, the packets in the window are resent. buffer is cleared and the window packets are put back into the buffer

Notes

  • sender/receiver in UDP protocol
  • implementation of GBN on top of UDP on both sender and receiver
  • guarantee packets be sent in correct order to higher layers****
  • unreliable channel emulation:
    • sender/receiver drops incoming packet/ACK w/ prob
  • [python3 gobackn.py self-port peer-port window-size [-d value-of-d | -p value-of-p]]
  • argv[0] = file name
  • argv[1] = sender port
  • argv[2] = receiver port
  • argv[3] = window size
  • argv[4] = d/p
  • argv[5] = value

Protocol

  • packet
    • each char = one packet (packet max len = 1 byte)
    • data packet = seq # (no format requirement) + data
    • ACK = seq #
  • buffer
    • sender/receiver have sending buffer
    • data packets put in buffer before send
    • data packets removed from buffer when corresp. ACK received
    • sending buff should be long enough to avoid conflict of packet #s
    • full buffer -> wait until more space is available
  • window
    • moves along sending buff
    • window should wrap if implemented as array
    • packets in window = sent out immediately
    • window size = passed as argument****
  • timer
    • starts after first packet sent out, stops when ACK received
    • timer restarts when window moves
    • timeout = 500ms

Emulation

  • GBN nodes to send packets over UDP protocol
  • receiver = deilberately discard data packets (probability)
  • sender = deliberately discard ACKs before handling them (probability)
  • probability = determinstic and probabilistic (passed as an arg)

Loss Rate Calculations (5pts/40pts)

  • a summary at the end of transmission
  • both sender and receiver print out ratioof packet failures/total packets received
  • tests provided

PART2: DISTANCE-VECTOR ROUTING ALG

Notes

Protocol

PART3: COMBINATION

Notes

  • Will be done later. Will see if have enough time

helpful links that sometimes slow my computer down like crazy so I save them all:

About

CSEE W4119 Computer Networks Programming Assignment 2 - Network Protocols Emulation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages