Download presentation
Presentation is loading. Please wait.
1
Net 221D : Computer Networks Fundamentals
Lab 6 Net 221D : Computer Networks Fundamentals T.A.Maram AlMuhareb
2
Question 1 1. Do port addresses need to be unique? Why or why not? Why are port addresses shorter than IP addresses? No , as long as each IP address/port address pair uniquely identify a particular process running on a particular host. example: a network consisting of 50 hosts, each running echo server software. Each server uses the well known port number 7, but the IP address, together with the port number of 7, uniquely identify a particular server program on a particular host. Port addresses are shorter than IP addresses because their domain, a single system, is smaller than the domain of IP addresses, all systems on the Internet. The destination IP address defines the host among the different hosts in the world. After the host has been selected, the por tnumber defines one of the processes on this particular host Computer networks / Andrew S. Tanenbaum-- 5th ed
3
Q2 Compare the TCP header and the UDP header. List the fields in the TCP header that are missing from UDP header. Give the reason for their absence. Behrouz A. Forouzan” Data communications and Networking
4
1. User Datagram Protocol (UDP )
UDP is a connectionless, unreliable transport protocol. It does not add anything to the services of IP (very simple) except to provide process-to process communication instead of host-to-host communication. (when to use it?) If a process wants to send a small message and does not care much about reliability, it can use UDP. UDP packets, called user datagrams, have a fixed size header of 8 bytes.
5
b. TCP Segment Format
6
Q 3 . What can you say about the TCP segment in which the value of the control field is one of the following? Control: This field defines 6 different control bits or flags. One or more of these bits can be set at a time. These bits enable flow control, connection establishment and termination, connection abortion, and the mode of data transfer in TCP Behrouz A. Forouzan” Data communications and Networking
7
Sol.3 a) b) c) None of the control bits are set. The segment is part of a data transmission without piggybacked acknowledgment The FIN bit is set. This is a FIN segment request to terminate the connection. The ACK and the FIN bits are set. This is a FIN+ACK in response to a received FIN segment
8
Q 4 What is the value of HLEN (in bits) in TCP segment if you know that the length of the data is 40 bytes and the total segment length is 100 bytes? Header length: A 4-bit field that indicates the number of 4-byte words in the TCP header Total length = Headr Len + data Len 100=?+40 Length of the header = 100 – 40 = 60 60 / 4(bits) = 15 HLEN = 15 bits Behrouz A. Forouzan” Data communications and Networking
9
Q 5 The following is representing a UDP header in hexadecimal format D 00 1C E2 17 a) What is the source port number? b) What is the destination port number? c) What is the total length of the data? d) What is the length of the data? 1586 13 28 byte Total length – header length = 28 – 8(fixed) = 20 Byte E C D 28 13 1586 Behrouz A. Forouzan” Data communications and Networking
10
Con. Sol.5 e) If you know that the destination IP address is , What is the value of the used socket address? Behrouz A. Forouzan” Data communications and Networking
11
Q 6 In a connection, the value of cwnd is 3000 and the value of rwnd is The host has sent bytes that is not been acknowledged. How many more bytes can be sent? Window size= minimum (cwnd ,rwnd) Window size = minimum (3000 , 5000)=3000 The number of bytes that can be sent = 3000 − 1000 = 2000 bytes rwnd = receiver window size, cwnd = congestion window size Behrouz A. Forouzan” Data communications and Networking
12
Q7 TCP opens a connection using an initial sequence number (ISN) 14,500. The other party opens the connection with an ISN of 21,000. Show the three TCP segments during the connection establish. Behrouz A. Forouzan” Data communications and Networking
13
Sol.7 Behrouz A. Forouzan” Data communications and Networking
14
Three-way handshaking process
1.The client sends the first segment, a SYN segment, in which only the SYN flag is set. This segment is for synchronization of sequence numbers. It consumes one sequence number. When the data transfer starts, the sequence number is incremented by 1. The SYN segment carries no real data 2. The server sends the second segment, a SYN +ACK segment, with 2 flag bits set: SYN and ACK. This segment has a dual purpose. It is a SYN segment for communication in the other direction and serves as the acknowledgment for the SYN segment. It consumes one sequence number. 3. The client sends the third segment. This is just an ACK segment. It acknowledges the receipt of the second segment with the ACK flag and acknowledgment number field. The sequence number in this segment is the same as the one in the SYN segment. The ACK segment does not consume any sequence numbers.
15
Q 8 . What is the difference between open-loop congestion control and closed-loop congesion control In open-loop congestion control, policies are applied to prevent congestion before it happens Closed-loop congestion control mechanisms try to alleviate congestion after it happens. Behrouz A. Forouzan” Data communications and Networking
16
Q 9 What determines the sender window size in TCP?
The minimum between ( rwnd , cwnd) Behrouz A. Forouzan” Data communications and Networking
17
Q 10 What are the four general techniques to improve quality of services? Scheduling: A good scheduling technique treats the different flows in a fair and appropriate manner. Ex : FIFO queuing, priority queuing Traffic shaping: Leaky bucket, token bucket Leaky bucket : Bursty chunks are stored in the bucket and sent out at an average rate token bucket :The token bucket allows bursty traffic at a regulated maximum rate. Behrouz A. Forouzan” Data communications and Networking
18
Con. Q 10 Resource reservation :A flow of data needs resources such as a buffer, bandwidth, CPU time, and so on. Thequality of service is improved if these resources are reserved beforehand Admission control: accept or reject a flow based on predefined parameters called flow specification Behrouz A. Forouzan” Data communications and Networking
19
The End Any Questions ? Networks and Communication Department
20
Behrouz A. Forouzan” Data communications and Networking
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.