CPSC 441, Fall 2018
Information About the Second Test

The second and final test will take place in class on Wednesday, November 14. It will cover course material through Wednesday, November 7. Since the first test, we have looked at TCP services, the network layer, and the link layer. From the textbook, this includes parts of Chapters 3, 4, 5, and 6, starting from Section 3.4. We have generally concentrated more on Internet protocols than on general principles, and we have covered less detail as we proceeded deeper into the protocol stack. The main readings included Chapter 3, Sections 3.4, 3.5, and 3.7; Chapter 4, Sections 4.1, 4.2, and 4.3; and Chapter 6, Sections 6.1, 6.3, and 6.4. We more or less skimmed parts of Chapter 5, covering basic ides of the OSPF and distance vector routing algorithms, and just touching on BGP. You are responsible for earlier material to the extent that the new material builds on it.

The test will include mainly longer and shorter essay-type questions. The last question on the test will be a long, summary essay dealing with everything that we have covered from the beginning of the course. You will not be asked to write any Java code. There will be no questions on things we did in lab (unless they were also covered in class). I do not expect you to memorize the format of TCP, IP, or Ethernet headers, but you should be familiar with the important fields in those headers.

Here are some of the terms and ideas that you should know for the test:


TCP
sliding window protocol
sequence numbers
ACK numbers
cumulative ACKs
TCP connection setup and tear down
   three-way handshake:  SYN, SYNACK, ACK
   FIN packets for closing the connection
TCP header fields
   source and destination port numbers
   sequence and acknowledgement numbers
   flags (SYN, ACK, FIN, RST)
   receive window size
MTU (Maximum Transmission Unit), maximum packet size 
MSS (Maximum Segment Size), maximum length of application data
TCP services
   reliable two-way connection
   flow control
   congestion control
reliable communication
   all packets delivered to upper level protocol, in order
   uses sequence numbers and ACK numbers
   uses retransmission
   duplicate ACKs and fast retransmit
RTT (Round Trip Time)
retransmission timeout: 
   [ you do not need t memorize these, but you should understand them ]
   EstimatedRTT = (1/8)*EstimatedRTT + (7/8)*SampleRTT
   DevRTT = (1/4)*DevRTT + (3/4)*abs(EstimatedRTT - SampleRTT)
   TimeoutInterval = EstimatedRTT + 4*DevRTT
flow control
   avoid sending more data than receiver can handle
   uses receive window size, rwnd, from TCP header
congestion control in TCP
   avoid overloading routers by backing off transmission rate when packet loss occurs
   in traditional congestion control, there is no explicit feedback from routers
   uses congestion window, cwnd; number of un-ACKed bytes <= max(rwnd,cwnd)
   slow start:  start with cwnd = 1 MSS, double cwnd for every RTT
   slow start ends upon packet loss or when cwnd reaches ssthresh
   congestion avoidance: increase cwind linearly until packet loss
   
the Network Layer: transmission of datagrams across a network possibly through routers
routers (Level 3, or L3, switches)
forwarding vs. routing
a router has interfaces on multiple networks and forwards packets between networks
forwarding tables (also called routing tables)
the  route -n  command and the routing table in a Linux computer
gateway router for a network
NAT (Network Address Translation) and how it helped extend the life of IPv4
IPv4:
    32-bit IP addresses, divided into network ID and host ID
    network numbers such as 10.0.0.0/8 and 192.168.1.0/24
    netmasks such as 255.0.0.0 and 255.255.255.0
    IPv4 header fields: 
        version number
        fields having to do with datagram fragmentation
        TTL (Time-to-live), used to avoid infinite looping
        source and destination IP addresses
    ICMP (Internet Control Message Protocol), used for example by ping and traceroute
why IPv6 is necessary
some of the many changes in IPv6:
    128-bit IP numbers
    no fragmentation
    fixed-length header
routing algorithms: computing fowarding tables for routers
autonomous systems (AS)
differences between intra-AS and inter-AS routing
link state algorithms:
   every node has full knowledge and computes shortest paths
   requires broadcast from every node about state of all of its links
   OSPF -- an intra-AS link-state routing algorithm
distance vector algorithms:
   distance vector at a node holds current best estimate of distance (cost) to other nodes
   only requires direct communication (exchange of distance vectors) between neighboring nodes
   nodes update their distance vectors based on information from neighbors' distance vectors
   basic equation:   D_y(x)  =  min( D_y(x),  c(x,v) + D_v(y) )
border routers and BGP (Border Gateway Protocol)m -- inter-AS routing

the Link layer   
two kinds of link:  point-to-point and broadcast
broadcast implies shared media
types of multiple access used for broadcast media:
    channel partitioning protocols:
       TDM: Time Division Multiplexing
       FDM: Frequency Division Multiplexing
       CDMA: Code Division Multiple Access (used in some cellular data networks)
    taking turns protocol:
       Token Ring, extinct (?) competitor to Ethernet
    random access protocols
       implies possibility of collisions
       CSMA: Carrier Sense Multiple Access
       CSMA/CD:  Carrier Sense Multiple Access with Collision Detection (traditional Ethernet)
       CSMA/CA:  Carrier Sense Multiple Access with Collision Avoidance (WiFi)
Ethernet
    a link-layer protocol with many physical protocols (thinwire, 10BASE-T, 100BASE-SX, etc.)
    MAC address (Media Access Control)
    48-bit unique MAC address, built into Ethernet interface
    the address FF:FF:FF:FF:FF:FF (all 1's) is used for broadcast
    originally, ethernet used shared media and CSMA/CD, with exponential backoff
    current LAN technology is switched Ethernet
Ethernet switches (Level 2, or L2, switches):
    eliminate collisions
    use a point-to-point full duplex connection to each host
    packet switching, based on ethernet addresses
    plug-and-play; require no configuration; they are self-learning
       learns by inspecting source Ethernet addresses in arriving packets
    forward broadcast packet to all links, except the one it arrived on
    forward non-broadcast packet just to appropriate link, IF KNOWN;
       otherwise, forward it to all links
Ethernet frame format:
    preamble (seven 10101010's followed by one 10101011), for synchronizing clocks
    destination and source Ethernet address
    type of data
    data from upper layer protocol
    CRC (Cyclic Redundancy Check), for error detection
ARP (Address Resolution Protocol)
    finds the Ethernet address associated with a given IP address on the local network
    host broadcasts an ARP query with the IP address;
        the Ethernet adapter for that IP responds directly to the host
    host stores the information in an ARP table
    the  arp -n  command
datagrams going out of the local network are addressed to the router's MAC address