Paper solution Subject: Computer Networks (TE Computer- 2012 pattern) Marks : 30 Date: 5/2/2015 Q1 a) What is difference between persistent and non persistent HTTP? Also Explain HTTP message format. [6] Ans: Difference between Persistent and Persistent HTTP is as follows: Non persistent HTTP Persistent HTTP Server closes connection after sendin Server leaves connection open after sendin response response Requires 2 RTTs per object One RTT for all the referenced objects New connection must be established an maintained for each requested object There are two HTTP messages 1. HTTP Request message 2. HTTP Response Message HTTP Message formats are given below client sends requests as soon as encounters a referenced object OS overhead for each TCP connection No overhead for each TCP connection Slow response Faster in response At most one object is sent over a TC Multiple objects can be sent over sing connection. TCP connection between client and server Figure: HTTP Request Message format HTTP request message contains request line and header line. Request line has 3 fields- 1. Method- The request method indicates the method to be performed on the resource identified by the given Request-URI. It includes GET,POST,HEAD
2. URL- It is a unique address for a file that is accessible on the internet. 3. Version- HTTP version either 1.0 or 1.1 Header line has 2 fields, header field name and its value. HTTP Message formats are given below Figure: HTTP Response Message format HTTP response message contains status line and header line and entity body.a Status-Line consists of the protocol version followed by a numeric status code and its associated textual phrase. The response-header fields allow the server to pass additional information about the response which cannot be placed in the Status- Line. Q1 b) Compare IMAP and POP3. [4]
Q2 a) Compare file transfer using SMTP and HTTP. [7] SMTP HTTP Transfer files (eg;email messages) from ontransfers files from web server to web us mail server to another mail server agent (ie. The browser) Push protocol: the sending mail server push Pull protocol: someone loads information on the file to the receiving mail server. web server and users use HTTP to pull th particular, the TCP connection is initiated binformation offthe server at their convenienc the machine that wants to send the file. In particular, the TCP connection is initiate by the machine that wants to receive the file. Requires each user message, including thdo not impose this restriction body of each message to be in 7 bit ASC format. If the message contains that are not bit ASCII, then the message has to be encode into 7-bit ASCII Uses TCP Protocol Uses TCP Protocol Port no is 25 Port no is 80 multiple objects sent in multipart message each object encapsulated in its own respon message Q2 b)state which transport layer protocol is used by following application layer protocol. HTTP,FTP,DHCP,DNS,SMTP,TELNET Application Layer Protocol Transport layer Protocol TCP/UDP HTTP TCP SMTP TCP DNS UDP/TCP TELNET TCP DHCP UDP FTP TCP Q3 a) What is QOS? Explain various parameters for QOS in a network [6] Quality of service (QoS) is the overall performance of a telephony or computer network, particularly the performance seen by the users of the network. There are 4 requirements for achieving QoS in a network: 1>Reliability- Reliability is concerned with the ability of a network to carry out a desired operation according to its specifications 2>Jitter- Jitter is defined as a variation in the delay of received packets. 3>Delay- is the amount of time required to transmit packets.
4>Bandwidth- amount of information that can be transmitted over a network in a given amount of time Q3 b) List TCP congestion control approaches? Explain any one. [4] TCP congestion control algorithms are: 1. slow start, 2. congestion avoidance, 3. fast retransmit, and 4. fast recovery Slow Start: When connection is established, the sender initializes the congestion window to the size of the maximum segment in use on the connection. It then sends the one maximum segment. If this segment is acknowledged before timeout occurs then it doubles the segment size.this is continued until the timeout occurs or receivers window size is reached Congestion avoidance : When the size of congestion window reaches the slow start threshold, the slow start phase stops and the additive phase begins. Congestion detection : If congestion occurs the congestion window size must be decreased. That means when a timer time outs or when 3 Acks are received the size of the threshold is dropped to ½ (multiplicative decrease) Q4 a) Explain in detail RTP with packet header format. [7] RTP is an Internet standard for real-time data like interactive audio, video, and simulation data. It is primarily designed for multi-user multimedia conference like session management and scalability considerations. It also provides end-to-end transport functions
for real-time applications such as payload type identification, sequence numbering,time stamping,delivery monitoring. Version (V, 2bits): =2 Padding(P, 1bit): If set, last byte of payload is padding size Extension(X, 1bit): If set, variable size header extension exists Figure : RTP packet header format CSRC count (4 bits): number of Contributors, max 16 can be possible Marker (1 bit): defined in profile, mark end of data Payload type (7 bits): Audio/Video encoding scheme Sequence number: random initial value, increase by one for each RTP packet; for loss detection and seq. restoration SSRC: identify source; chosen randomly and locally; collision needs to be resolved CSRC list: id. Of contributing sources, inserted by mixer Q4 b) Draw TCP header format [3] Figure : TCP Header format
Q5 a) Explain distance vector routing? What are the advantages & disadvantages of DV routing?[6] ANS : Distance Vector Routing: When this algorithm is used by a routing protocol, each router advertises its routing table to its adjacent neighbors. Each advertisement contains the following information about each route in that routing table: The hop count for the route (the distance) The direction in which the route is located (the vector) These advertisements are performed independently by all routers. In addition, routers receiving advertisements do not generate acknowledgments, which reduces the overhead of routing protocol traffic. Routers select the route with the lowest cost to each possible destination and add this to their own routing tables. These neighbors propagate the information to their neighbors hop by hop until information from all routers has spread throughout the entire internetwork. In Distance Vector routing, routers update their record based on these events: When routers are started When routers have changes to their routing tables On a periodic basis Advantages of Distance Vector routing: It is simpler to configure than Link State It is simpler to maintain than Link State Disadvantages of Distance Vector routing: It is slower to converge than Link State It is at risk from the count-to-infinity problem It creates more traffic than Link State since a hop count change must be propagated to all routers and processed on each router. Q5 b) Draw and explain IPV4 header format[4]
Figure: IPV4 Header format Version: IP Version: 4 for IPv4 and 6 for IPv6 HLen: Header Length- 32-bit words (typically 5) TOS: Type of Service -Priority information Identifier, flags, fragment offset used primarily for fragmentation Time to live -Must be decremented at each router, Packets with TTL=0 are thrown away. Ensure packets exit the network. Protocol - Demultiplexing to higher layer protocols TCP = 6, ICMP = 1, UDP = 17 Header checksum- Ensures some degree of header integrity Options-E.g. Source routing, record route, etc. Source Address- 32-bit IP address of sender Destination Address-32-bit IP address of destination Q6 a) Divide the network 220.125.5.192/26 into 8 sub networks. How many hosts can be connected in each network? Show their IP range, network address and broadcast address. [6] No of addresses for whole network are N= 2 32-26 =2 6 =64 First Address in network is- 220.125.2.192/26 Last address in network is- 220.125.5.255/26 As 8 subnet has to design so we divide no of address with no of sub networks i.e. 64/8= 8. That means each network has 8 addresses. New subnet mask will be: For 8 network 3 bits are required (log2 8 =3) to add to /26 mask, so new mask will be 26+3=29.
Sub network Network range Network Address Broadcast Address 1 220.125.5.192/29-220.125.5.199/29 220.125.5.192/29 220.125.5.199/29 2 220.125.5.200/29-220.125.5.207/29 220.125.5.200/29 220.125.5.207/29 3 220.125.5.208/29-220.125.5.215/29 220.125.5.208/29 220.125.5.215/29 4 220.125.5.216/29-220.125.5.223/29 220.125.5.216/29 220.125.5.223/29 5 220.125.5.224/29-220.125.5.231/29 220.125.5.224/29 220.125.5.231/29 6 220.125.5.232/29-220.125.5.239/29 220.125.5.232/29 220.125.5.239/29 7 220.125.5.240/29-220.125.5.247/29 220.125.5.240/29 220.125.5.247/29 8 220.125.5.248/29-220.125.5.255/29 220.125.5.248/29 220.125.5.255/29 Q6 b) Describe in short the importance and working of following commands Ping IP config Trace route netstat [4] 1. Ping: Verifies IP-level connectivity to another TCP/IP computer by sending Internet Control Message Protocol (ICMP) Echo Request messages. The receipt of corresponding Echo Reply messages are displayed, along with round-trip times. Ping is the primary TCP/IP command used to troubleshoot connectivity, reachability, and name resolution. 2. IP Config: Displays all current TCP/IP network configuration values and refreshes Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings. This command is most useful on computers that are configured to obtain an IP address automatically. This enables users to determine which TCP/IP configuration values have been configured by DHCP, Automatic Private IP Addressing (APIPA), or an alternate configuration. 3. Trace route: Determines the path taken to a destination by sending Internet Control Message Protocol (ICMP) Echo Request messages to the destination with incrementally increasing Time to Live (TTL) field values. The path displayed is the list of near-side router interfaces of the routers in the path between a source host and a destination. 4. Netstat: Displays active TCP connections, ports on which the computer is listening, Ethernet statistics, the IP routing table, IPv4 statistics (for the IP, ICMP, TCP, and UDP protocols), and IPv6 statistics (for the IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 protocols). Netstat provides statistics for the following: Proto - The name of the protocol (TCP or UDP). Local Address - The IP address of the local computer and the port number being used. Foreign Address - The IP address and port number of the remote computer to which the socket is connected.