Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE4605: IP & TCP.

Similar presentations


Presentation on theme: "ECE4605: IP & TCP."— Presentation transcript:

1 ECE4605: IP & TCP

2 Announcements 2 students per group
Same group for both project and paper presentations If you have not sent the group information, please do so by tonight!

3 Reading List Up on our class website
Group 1 will present paper 1, etc. First 4 groups will present the coming week Tue, September 5th Group 1: TCP Vegas Group 2: TCP-SACK Thu, September 7th Group 3: IPv6 Group 4: pTCP

4 Presentations Plan for 25-30 minutes ~15 slides Introduction
setting up context relating to lectures Concepts/Algorithms/Main body of work Results/Performance Evaluation Critique/Suggestions for Improvement Questions (at least 5 per presentation, distributed along talk) Rehearse if possible

5 Internet Protocol (IP)
Addressing Routing Fragmentation and Reassembly Quality of Service Multiplexing and Demultiplexing

6 IP Routing Direct Indirect
If source and destination hosts are connected directly Still need to perform IP address to physical address translation. Why? Indirect Table driven routing Each entry: (NetId, RouterId) Default router Host-specific routes

7 IP Routing Algorithm RouteDatagram(Datagram, RoutingTable)
Extract destination IP address, D, from the datagram and compute the netID N If N matches any directly connected network address deliver datagram to destination D over that network Else if the table contains a host-specific route for D, send datagram to next-hop specified in table Else if the table contains a route for network N send datagram to next-hop specified in table Else if the table contains a default route send datagram to the default router specified in table Else declare a routing error

8 Routing Protocols Interior Gateway Protocol (IGP)
Within an autonomous domain RIP (distance vector protocol), OSPF (link state protocol) Exterior Gateway Protocol (EGP) Across autonomous domains BGP (border gateway protocol)

9 IP Fragmentation The physical network layers of different networks in the Internet might have different maximum transmission units The IP layer performs fragmentation when the next network has a smaller MTU than the current network MTU = MTU=500 IP fragmentation

10 IP Reassembly Fragmented packets need to be put together
Where does reassembly occur? What are the trade-offs?

11 Multiplexing Web Email MP3 Web Email MP3 TCP UDP TCP UDP IP IP
IP datagrams IP datagrams

12 IP Header Used for conveying information to peer IP layers Source
Destn Application Application Transport Router Router Transport IP IP IP IP DataLink DataLink DataLink DataLink Physical Physical Physical Physical

13 IP Header (contd.) 4 bit version 4 bit hdr length 16 bit total length
TOS 16 bit identification 3 bit flags 13 bit fragment offset 8 bit TTL 8 bit protocol 16 bit header checksum 32 bit source IP address 32 bit destination IP address Options (if any) (maximum 40 bytes) data

14 Transmission Control Protocol (TCP)
End-to-end transport protocol Responsible for reliability, congestion control, flow control, and sequenced delivery Applications that use TCP: http (web), telnet, ftp (file transfer), smtp ( ), chat Applications that don’t: multimedia (typically) – use UDP instead

15 Ports, End-points, & Connections
IP Layer TCP UDP http ftp smtptelnet A1 A2 A3 Transport Port IP address Protocol ID Thus, an end-point is represented by (IP address,Port) Ports can be re-used between transport protocols A connection is (SRC IP address, SRC port, DST IP address, DST port) Same end-point can be used in multiple connections

16 TCP Connection Establishment Connection Maintenance
Reliability Congestion control Flow control Sequencing Connection Termination

17 Active and Passive Open
How do applications initiate a connection? One end (server) registers with the TCP layer instructing it to “accept” connections at a certain port The other end (client) initiates a “connect” request which is “accept”-ed by the server

18 Connection Establishment & Termination
3-way handshake used for connection establishment Randomly chosen sequence number is conveyed to the other end Similar FIN, FIN+ACK exchange used for connection termination Server does passive open Accept connection request Send acceptance Start connection Active open Send connection request SYN SYN+ACK ACK DATA

19 Fundamental Mechanism
ack data data retx Simple stop and go protocol Timeout based reliability (loss recovery) Multiple unacknowledged packets (W) ack data Sliding Window Protocol: ….

20 Congestion Control Slow Start Start with W=1 For every ACK, W=W+1
Congestion Avoidance (linear increase) For every ACK, W = W+1/W Congestion Control (multiplicative decrease) ssthresh = W/2 W = 1 Alternative: Fall to W/2 and start congestion avoidance directly

21 Why LIMD? (fairness) W=1 W=W/2 100 10 diff = 90 1 1 diff = 0
Problem? – inefficient W=W/2 diff = 45 51 6 diff = 45 52 7 diff = 45 .. diff = 45 diff = 23.5 diff = 23.5 diff = 11.2

22 Reliability (Loss Recovery)
ack data Sequence Numbers TCP uses cumulative Acknowledgments (ACKs) Next expected in-sequence packet sequence number Pros and cons? Piggybacking Timeout calculation Rttavg = k*Rttavg + (1-k)*Rttsample RTO = Rttavg + 4*Rttdeviation 5 1 2 3 4 3 1 2 4

23 Flow Control Prevent sender from overwhelming the receiver
Receiver in every ACK advertises the available buffer space at its end Window calculation MIN(congestion control window, flow control window)

24 Sequencing Byte sequence numbers
TCP receiver buffers out of order segments and reassembles them later Starting sequence number randomly chosen during connection establishment Why? 3 1 2 4 1 given to app 2 given to app Loss 4 buffered (not given to app) 3 & 4 given to app 4 discarded

25 TCP Segment Format 16 bit SRC Port 16 bit DST Port
32 bit sequence number 32 bit ACK number HL resvd flags 16 bit window size Flags: URG, ACK, PSH, RST, SYN, FIN 16 bit TCP checksum 16 bit urgent pointer Options (if any) Data

26 TCP Flavors TCP-Tahoe TCP-Reno TCP-newReno TCP-Vegas, TCP-SACK
W=1 adaptation on congestion TCP-Reno W=W/2 adaptation on fast retransmit, W=1 on timeout TCP-newReno TCP-Reno + fast recovery TCP-Vegas, TCP-SACK

27 TCP Tahoe Slow-start Congestion control upon time-out or DUP-ACKs
When the sender receives 3 duplicate ACKs for the same sequence number, sender infers a loss Congestion window reduced to 1 and slow-start performed again Simple Congestion control too aggressive

28 TCP Reno Tahoe + Fast re-transmit
Packet loss detected both through timeouts, and through DUP-ACKs Sender reduces window by half, the ssthresh is set to half of current window, and congestion avoidance is performed (window increases only by 1 every round-trip time) Fast recovery ensures that pipe does not become empty Window cut-down to 1 (and subsequent slow-start) performed only on time-out

29 TCP New-Reno TCP-Reno with more intelligence during fast recovery
In TCP-Reno, the first partial ACK will bring the sender out of the fast recovery phase Results in timeouts when there are multiple losses In TCP New-Reno, partial ACK is taken as an indication of another lost packet (which is immediately retransmitted). Sender comes out of fast recovery only after all outstanding packets (at the time of first loss) are ACKed

30 User Datagram Protocol (UDP)
Simpler cousin of TCP No reliability, sequencing, congestion control, flow control, or connection management! Serves solely as a labeling mechanism for demultiplexing at the receiver end Use predominantly by protocols that do no require the strict service guarantees offered by TCP (e.g. real-time multimedia protocols) Additional intelligence built at the application layer if needed

31 UDP Header Src Port Dst Port Length: length of header + data (min = 8)
Checksum

32 Puzzle Man in a boat floating in a swimming pool 
He has a large solid iron ball If he drops the ball into the water, what happens to the level of water in the swimming pool? (increases, decreases, stays the same?)


Download ppt "ECE4605: IP & TCP."

Similar presentations


Ads by Google