1. Computer Networks
    1. Network Requirements
      1. equipment and services that facilitate the transfer of information between users at different location
      2. Telephone - real time, reliable, low capacity, 2-way
    2. Ethernet
      1. all nodes connected via a sub or swith
      2. directly connects 2/4/8 different devices
      3. a hub may become a bottleneck
      4. a switch does not suffer from inter-device collisions
        1. may become saturated
      5. duplex devices can transmit and receive simultaneously
    3. Internet
      1. network of networks
        1. can be of different types
      2. connected by routers/gateways
      3. internet protcol allows routers to understand and direct how transmissions are to be routed
    4. OSI standard
      1. allows computers to communicate across different networks
      2. Layers
        1. Application
          1. mail servers
        2. Presentation
          1. reforms data between host/network
        3. Session
          1. controls when to talk and waypoints
        4. Transport
          1. does src-to-dst delivery of message
          2. all transport parameters can be configured dynamically
          3. we say Transport is TCP
          4. packets in a data stream may go different routes
        5. Network
          1. controls the routing of data packets
          2. interacts with routers on the network
          3. Internet Protocol is a network layer control packet routing
          4. rare to program at this level
        6. Link
          1. organizes data between packets into larger frames
          2. transforms the physical layer into a reliable node-node-link
          3. makes physical layer appear error-free to upper levels
        7. Physical
          1. transfers data from high level into physical signals
          2. defines how bits are represented
          3. synchronixes clocks on sender and receiver
          4. configures the line
          5. defines the physical topology and physical properties
  2. TCP/IP (network architecture)
    1. Topic
    2. IP (Internet Protocol)
      1. best effort service via routers that understand IP
        1. does not correct for lost packets
      2. IP is connectionless
        1. no concept of stream
        2. each packet is independent
          1. contains all necessary addressing infomation in IP header
        3. each packet is routed independently
          1. can be routed around failure points
        4. make the internet very robust
          1. but only in the large
      3. IP Packet
        1. IP header
        2. 4 bits Version, IPv4 or 6
        3. describes priority
        4. header checksum
          1. used for error detection
        5. 5 words, 20 bytes, or 160 bits
    3. TCP
      1. Establishing a TCP protocol connection
        1. A 3-way handshake establishes a connection
      2. Improvement of IP
        1. runs on IP
      3. detects lost or corrupted packets and requests retrasmits
      4. rearranges packets arriving out-of-order
      5. problem with TCP is that it sends streams of bytes
        1. Stream Control Transmission Protcol (SCTP)
          1. allows application layer to send 2 packets of 512 bytes
      6. help minimize network congestion (good netizenship)
        1. modifies its behaviour from moment to moment for the good of the whole internet
        2. not always the fastest
        3. slow start
          1. soical algorithms
          2. don't start a connection sending big packets
          3. start with small packet size then increase
          4. bound size of total data lost in net
          5. fast recovery variant
          6. on packet loss, window drops to half last known good threshold
      7. provides the illution of a reliable stream of data bytes
      8. TCP packet
        1. source port
        2. destination port
        3. data
        4. port identifies communication application processes
  3. DNS
    1. Domain Name Service
      1. machine name to IP address translation table for all the net was kept in one machine at MIT
      2. as the net grew, database became decentralised
      3. hierarchical distributed lookup service
      4. top level domains .com
      5. domain name service gives memorable names to IP
      6. there are 'root servers' with known IP addresses
    2. User Datagram Protocol
      1. no order control or error correction and recovery
      2. no segmentation/ressembly of data into smaller packets
      3. only small individual messages can be sent
      4. used for fast low-overhead purposes
      5. application level can retry or drop as it thinks fit
      6. E.G. DNS, VOIP
  4. IP addressing
    1. IP addressing
      1. each network on internet identifies each node uniquely
      2. a hierarchical address method is used
      3. each packet carries its destination IP address in the IP header
    2. IP subnet masks
      1. each IP address has a binary representation
        1. subnet mask defines subnet addresses
      2. Two reserved IP addresses
        1. network address
          1. binary representation terminates in all 0s
        2. broadcast address
          1. binary representation that terminates in all 1s
      3. Non-Routable IP addresses
        1. 5% of available IP address space is reserved
        2. packets with 127.x.x are not allowed out
      4. Nat means boundary router on your LAN