TCP Second phase of the project Emphasizing on the followings: Connection management Flow control and congestion control Reliable transmission (packet retransmission) Please check some networking textbooks for details on TCP and OSPF Fall 2004 FSU CIS 5930 Internet Protocols 1 Fall 2004 FSU CIS 5930 Internet Protocols 2 Connection management Connection establishment Three-way handshaking SYN/ACK Window size (buffer that you have) Connection release FIN/ACK Preparing to receive data before ACKed Preparing for packet loss Timer for SYN packet You can close your connection without receiving ACK, but after a certain amount of time Fall 2004 FSU CIS 5930 Internet Protocols 3 Flow control and congestion control Three parameters: Receiver window size (rwnd), congestion window size (cwnd), slow-start threshold (ssthresh) At any time Sendingdata <= min(rwnd, cwnd) Fall 2004 FSU CIS 5930 Internet Protocols 4 1
Slow start and congestion avoidance At beginning cwnd = one segment ssthresh = 64K While cwnd <= ssthresh Double cwnd after each window round (increasing cwnd by one (packet) every time packet ACKed) After cwnd > ssthresh Linear increasing Increasing cwnd by one after each window round (cwnd += 1/cwnd) Fall 2004 FSU CIS 5930 Internet Protocols 5 Reliable transmission (conceptually) a timer for each unacked packet When timer goes off, retransmit packet At receiver side A modified Go-back-N Buffering out-of-order packets Acking maximum continually received packet Fall 2004 FSU CIS 5930 Internet Protocols 6 Reliable transmission How to set time-out interval? Estimating RTT RTT = alpha RTT + (1-alpha) new_sample Time-out = beta RTT Open Shortest Path First (OSPF) We use a simplified version OSPF has two phases Learning phase, when an OSPF router first starts Maintenance phase, thereafter Fall 2004 FSU CIS 5930 Internet Protocols 7 Fall 2004 FSU CIS 5930 Internet Protocols 8 2
Learning phase (5 steps) Learning neighbors Neighbors are ones on the same subnet Exchanging connectivity info with neighbors Flooding learned info Computing shortest path to all routers Computing shortest path to all subnets OSPF message types OSPF_TYPE_HELLO To probe other routers OSPF_TYPE_HELLOACK To respond to hello messages OSPF_TYPE_LSA_UPDATE To advertise updates (connectivity info) Fall 2004 FSU CIS 5930 Internet Protocols 9 Fall 2004 FSU CIS 5930 Internet Protocols 10 When an OSPF router starts It probes others After a certain amount of time (say 10 seconds), it assumes it has all topology info Computing shortest paths by applying Dijkstra algorithm You get shortest paths to all other routers Computing shortest paths to all subnets Maintenance phase It probes others with a larger interval Say 1 probe per 10 seconds If it does not hear from a neighbor for several probe intervals, it assumes the neighbor is dead Say 3 probes, (I.e., 30 seconds) Propagating this loss of neighbor Recomputing shortest-paths Fall 2004 FSU CIS 5930 Internet Protocols 11 Fall 2004 FSU CIS 5930 Internet Protocols 12 3
Grading policy (100 points) 1. Emulation of packet loss: 5 points 2. TCP connection management 3. TCP congestion management 1. Slow start, congestion avoidance, TCP Tahoe or Reno 4. TCP retransmission (go back N or selective repeat) 5. FTP application Fall 2004 FSU CIS 5930 Internet Protocols 13 Second phase (Cont d) OSPF learning neighbors: 5 points OSPF exchanging connectivity OSPF flooding OSPF computing shortest path to all routers OSPF computing shortest path to all subnets Code readability: 5 points Report: 5 points Fall 2004 FSU CIS 5930 Internet Protocols 14 A new command ip ip loss ip ospfd ip sh route Showing the content of the routing table Project UDP and TCP To configure a local host APPL [UDP TCP] port_number type Type: MSG: for short messages FTP: for file transfer ip rm route Deleting all content of the routing table Fall 2004 FSU CIS 5930 Internet Protocols 15 Fall 2004 FSU CIS 5930 Internet Protocols 16 4
UDP and TCP For two hosts to communicate MSG [UDP TCP] source_port, dst, dst_port message FTP source_port dst dst_port file_name For file transfer A simple file transfer protocol: Client specifies the name of the file he wants to download from the server. Fall 2004 FSU CIS 5930 Internet Protocols 17 5