200 likes | 291 Views
3.1 . Transport Mux ( Port and socket ) Peer Instruction Answer 3.1. Through a specific port (e.g. port 80), an application process (e.g. Web server) can communicate with multiple (the following number of) remote (e.g. client) processes: Answer:
E N D
3.1. Transport Mux (Port and socket) Peer InstructionAnswer 3.1 Through a specific port (e.g. port 80), an application process (e.g. Web server) can communicate with multiple (the following number of) remote (e.g. client) processes: Answer: (A) Exactly 1 (B) 2 (C) 3 (D)An arbitrary number (E)None of the above Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
3.1. Transport Mux (Port and socket) Peer InstructionAnswer 3.1 Through a specific port (e.g. port 80), an application process (e.g. Web server) can communicate with multiple (the following number of) remote (e.g. client) processes: Answer: (A) Exactly 1 (B) 2 (C) 3 (D)An arbitrary number (E)None of the above Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
3.1b. Transport Mux Peer InstructionAnswer 3.1b Through a specific socket, an application process (e.g. Web server process or client process) can communicate with multiple (the following number of) remote (e.g. client or server) processes: Answer: (A) Exactly 1 (B) 2 (C) 3 (D)An arbitrary number (E)None of the above Port: Kind of application (e.g. Web: port 80) Socket: Connection End Point Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
3.1b. Transport Mux Peer InstructionAnswer 3.1b Through a specific socket, an application process (e.g. Web server process or client process) can communicate with multiple (the following number of) remote (e.g. client or server) processes: Answer: (A) Exactly 1 (B) 2 (C) 3 (D)An arbitrary number (E)None of the above Port: Kind of application (e.g. Web: port 80) Socket: Connection End Point Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
3.2 NAKPeer Instruction - Question Is NAK necessary (T or F) and sufficient (T or F) ? Answer: (A): F, F (B): F, T (C): T, F (D): T, T (E):B, CandD Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
3.2 NAKPeer Instruction - Answer Is NAK necessary (T or F) and sufficient (T or F) ? Answer: (A): F, F (B): F, T (C): T, F (D): T, T (E):B, CandD • NAK is not necessary: • We can use timeout for retransmission • 2. NAK is not sufficient: • what happens if NAK gets lost ! Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
3.3 Alternating Bit Protocol V.1:P Question SENDER RECEIVER + ACK1 + ACK0 - ACK1 + Error + DATA1 + Error + ACK1 0 3 0 3 + DATA1 + DATA0 - DATA0 [TimeOut] - DATA1 + DATA1 + DATA0 1 2 1 2 + DATA0 + Error + Error + ACK1 + ACK0 + ACK0 - ACK0 • Indicate if this protocol contains the following design errors: (briefly explain the errors, if any) • (A): Unspecified Reception • (B): Non-executable Interaction • (C): State deadlock (or livelock) • (D): All of the above • (E): No errors. Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
3.3 Alternating Bit Protocol V.1 Answer SENDER RECEIVER + ACK1 + ACK0 - ACK1 + Error + DATA1 + Error + ACK1 0 3 0 3 + DATA1 + DATA0 - DATA0 [TimeOut] - DATA1 + DATA1 + DATA0 1 2 1 2 + DATA0 + Error + Error + ACK1 + ACK0 + ACK0 - ACK0 • Indicate if this protocol contains the following design errors: (briefly explain the errors, if any) • (A): Unspecified Reception • (B): Non-executable Interaction • (C): State deadlock (or livelock) • (D): All of the above (each error was explained in class) • (E): No errors. Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
3.4 Window Protocol Questions Consider the previous example: • 1 Gbps link, • 15 ms e-e propagation delay, e.g. RTT = 30 ms • 1KB packet (1) What would be the window size to achieve 100% efficiency? (A)15 (B)30 (C)300 (D) 3751 (E) 4000 (F) None (2) How many bits at minimum are needed for the sequence number ? (A)4 (B)6 (C)12 (D) 13 (E) 15 (F) None Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
3.4a. Window Protocol: Answer R = 1 Gbps link, RTT = 30 ms, L = 1KB packet: Window size = RTT + (L/R) / (L/R) = 30.008 / .008 =3751 (a) What would be the window size to achieve 100% efficiency? (A)15 (B)30 (C)300 (D)3751(E) 4000 (F) None (b) How many bits at minimum are needed for the sequence number ? (A)4 (B)6 (C)12 (D) 13 (E) 15 (F) None Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
3.4b. Window Protocol: Answer R = 1 Gbps link, RTT = 30 ms, L = 1KB packet: Window size = RTT + (L/R) / (L/R) = 30.008 / .008 =3751 GobackN:Modulus >= W+1 # bits = log2 (W +1) = log2 (3752) = 12 Selective Repeat:Modulus >= 2W # bits = log2 (2W) = log2 (2x3751) = 13 (a) What would be the window size to achieve 100% efficiency? (A)15 (B)30 (C)300 (D) 3751 (E) 4000 (F) None (b) How many bits at minimum are needed for the sequence number ? (A)4 (B)6 (C)12 (D) 13 (E) 15 (F) None Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
Seq. #’s: byte stream “number” of first byte in segment’s data ACKs: seq # of next byte expected from other side cumulative ACK Q: how receiver handles out-of-order segments? A: TCP spec doesn’t say, - up to implementor time 4.1 TCP Seq/ACK #Peer Instr - Question Host B Host A User types ‘C’ Seq=42, ACK=79, data = ‘C’ host ACKs receipt of ‘C’, echoes back ‘C’ Seq= 79, ACK= 43, data = ‘C’ host ACKs receipt of echoed ‘C’ Seq= ?, ACK= ? Simple Telnet scenario Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
Seq. #’s: byte stream “number” of first byte in segment’s data ACKs: seq # of next byte expected from other side cumulative ACK Q: how receiver handles out-of-order segments? A: TCP spec doesn’t say, - up to implementor time 4.1 TCP Seq/ACK #Peer Instr - Answer Host B Host A User types ‘C’ Seq=42, ACK=79, data = ‘C’ host ACKs receipt of ‘C’, echoes back ‘C’ Seq= 79, ACK= 43, data = ‘C’ host ACKs receipt of echoed ‘C’ Seq= 43, ACK= 80 Simple Telnet scenario Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
SYN, SequenceNum = x , y 1 + SYN + ACK, SequenceNum = x Acknowledgment = ACK, Acknowledgment = y + 1 4.2 Connection Establishment Active participant Passive participant (client) (server) • Three-Way Handshake Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
4.2 TCP 3-way HanshakePeerInstr Question Why does TCP use 3-way handshake instead of 2-way ? Answer: (A):To ensure the presence of the remote host (B):To ensure the remote host is willing to accept the connection request. (C):To ensure common agreement on the initial sequence number at both sides. (D):To prevent a SYN segment of an old connection from causing confusion on the new connection establishment. (E):CandD Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
4.2 TCP 3-way HanshakePeerInstr Answer Why does TCP use 3-way handshake instead of 2-way ? Answer: (A):To ensure the presence of the remote host (B):To ensure the remote host is willing to accept the connection request. (C):To ensure common agreement on the initial sequence number at both sides. (D):To prevent a SYN segment of an old connection from causing confusion on the new connection establishment. (E):CandD Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
Seq=92, 8 bytes data Seq=92, 8 bytes data Seq=100, 20 bytes data Seq=120, 20 bytes data ACK2= ? ACK1= ? 4.3TCP cummulative ACKPeerInstr Question Host A Host B Host A Host B Seq=92, 8 bytes data X loss Seq=100, 20 bytes data timeout timeout ACK=120 SendBase = 120 SendBase = 120 time time (b) CumulativeACK scenario Fig 1. (a) CumulativeACK scenario Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
Seq=92, 8 bytes data Seq=92, 8 bytes data Seq=100, 20 bytes data Seq=120, 20 bytes data ACK=140 ACK=92 4.3TCP cummulative ACKPeerInstr Answer Host A Host B Host A Host B Seq=92, 8 bytes data X loss Seq=100, 20 bytes data timeout timeout ACK=120 SendBase = 120 SendBase = 120 time time (a’) Cumulative ACK scenario (b’) Cumulative ACK scenario Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
ACK= ? , WIN = ? 4.4. TCP Dynamic Window – Peer Instr – Question Window management in TCP Figure 2 (A) 4097, 1 (B) 5096, 1000 (C) 5120, 1024 (D) 6144, 2048 (E) None Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong
4.4. TCP Dynamic Window – Peer Instr – Answer Window management in TCP Figure 2 ACK= 4096 + 1024 = 5120 WIN = 1K = 1024 (A) 4097, 1 (B) 5096, 1000 (C) 5120, 1024 (D) 6144, 2048 (E) None Cpsc 317 Spring 2010 Instructor: Dr. Son Vuong