Introduction - Computer Networks

Theory


  • Communication
    • Input Message > Input Transducer > Transmitter > Channel > Receiver > Output Transducer > Output Message
  • Bandwidth
    • Volume of data that can be transferred over a network
  • Throughput
    • Indicates how much data was actually transferred from a source any given time
  • Latency
    • Time it takes for the data to get to its destination across the network
    • Measured in terms of round trip time

Models


  • TCP/IP
    • Developed by ARPANET
    • 4-Layer => Application Layer (Process to Process), Transport Layer (Host to Host), Internet Layer (Source to Destination), Network Access Layer (Node to Node)
    • 5-Layer => Application Layer, Transport Layer, Network Layer, Data Link Layer, Physical Layer
    • Support Client-Server and Peer to Peer
    • OSI Model
  • Open Systems Interconnection (OSI) Model
    • Introduced in 1970, by International Standards Organization (ISO)
    • Trick
      • Please (Physical Layer)
      • Do (Data Link Layer)
      • Not (Network Layer)
      • Tell (Transport Layer)
      • Stupid (Session Layer)
      • People (Presentation Layer)
      • Anything (Application Layer)
    • OSI Model YouTube Video
    • OSI Layers
    • Error

Cryptography


  • Error
  • CIA (Confidentiality, Integrity, Authenticity)
  • Key
    • Symmetric => Using same keys for encryption and decryption
      • Encryption standards => DES, AES, 3DES
    • Asymmetric
      • Public & Private key
      • Encryption using receivers public key
      • No. of keys required in a network of N devices = 2*N
      • RSA Algorithm
        • Choose two different large random prime no.
        • Calculate, n = p * q and Ø(n) = (p-1) * (q-1)
        • Choose "e" such that 1 < e < Ø(n)
          • "e" is co prime to Ø(n), gcd(e, Ø(n)) = 1
        • Calculate "d" such that d * e = 1 mod Ø(n)
          • d * e = 1 + k * Ø(n)
        • Public key "e", Private key "d"

Socket Programming


  • Error
  • Socket
    • Activates endpoint devices
    • Contains Domain (IPv6/IPv4), Type (TCP/UDP), Protocol
  • Bind
    • Associates socket address (IP + Port)
  • Listen
    • Waiting in Passive mode
    • Backlog => Pending requests in queue
Share: