HW8 solution - Department of Electrical & Computer Engineering

advertisement
Polytechnic University, Dept. Electrical and Computer Engineering
EE4414 Multimedia Communication System II
Fall 2005, Yao Wang
___________________________________________________________________________________
Homework 8 Solution (Networking - Basics)
1. What are the four major components that constitute the Internet?
The computers (or hosts) at the network edge, the routers at the network core, the transmission media that
link the computers and routers, and the protocols that govern the data transport among computers through the
routers.
2. What are the five protocol layers of the Internet? What are their primary functions?
The five layers are application, transport, network, link, and physical. The application layer protocols
govern the client-server interactions among hosts in different applications. Different application layer
protocols have been established for different applications. The transport layer protocols govern the transfer
of data from one host to another in any particular application. There are two types of transport layer
protocols, TCP and UDP. TCP is for connection-oriented data transfer, governs session set-up, error control,
flow control, and congestion control. The UDP protocol is for connection-less data transfer, and merely adds
a port number to the payload data. The network layer primarily performs network packet routing following
different routing protocols. It also performs packet fragmentation when necessary subject to a maximum
packet size, and error control at the network layer. The link layer refers to data transfer over individual links
in a chosen route and it has corresponding protocols governing link layer error control. The physical layer
refers to the actual transmission media (fibers, cables, wireless, etc) and various functions at that layer.
3. What is connectionless service? What is connection oriented service?
With connectionless service, data are sent from a source to a destination without establishing a connection in
advance, (i.e. no acknowledgement from the destination that it is ready and willing to accept the data). The
sender does not attempt to monitor whether the data are delivered to the destination. With connection
oriented service, a connection between the sender and destination is first established through a handshaking
process (i.e., the sender does not send until it knows that the destination is ready to receive the data). Only
after a session is established, the sender starts to send the data. The destination acknowledges the receipt of
any data sent by the sender so that the sender can monitor whether data are delivered to the right destination
and resend unacknowledged data.
4. What is circuit switching? What is packet switching? What type of service (connectionless vs.
connection-oriented) can each provide? What are the pros and cons of each?
With circuit switching, a circuit (consisting of dedicated physical links, or a certain portion of the total
bandwidth on each link, between the source and destination) is first established between the sender and the
destination, and this circuit is used only for the established session. With packet switching, the data to be
sent by different communication sessions are divided into packets, and packets from different sessions may
share the same physical link. Circuit switching always provides connection-oriented services, whereas packet
switching may provides either connectionless or connection-oriented services, depending on the transport
protocols used. With the UDP protocol, it provides connectionless service, whereas with the TCP protocol, it
provides connection oriented service. The benefit of using circuit switching is that the data in an established
session can be delivered reliably and quickly. However, because circuit switching does not allow data
multiplexing among different communication sessions, when the data on a particular session is bursty (not
always active), the bandwidth reserved for this session is wasted during the session is idle or have a data rate
much lower that the peak data rate. With packet switching, the total bandwidth on a physical link is provided
to multiple sessions on a first come first serve basis. As long as not all sessions are active at the same time, it
enables more session to be supported on the same total bandwidth than circuit switching. This is known as
statistical multiplexing. The problem with packet switching is that when all the total traffic at any particular
time exceeds the link capacity (with small probability though), some packets will have to be dropped,
leading to packet loss. To reduce packet loss, a large buffer can be used to smooth the data traffic, so that
packets are dropped only when the buffer is full. This however will lead to delay. When TCP is used to
retransmit lost packets, the end user does not see packet loss, rather packet delay.
5. Why do we need a port number in addition to an IP address?
The IP address is used to differentiate among computer hosts, whereas the port number is used to
differentiate among different applications. The combination of the IP address and port number allows a
computer to engage in multiple communication sessions simultaneously (e.g., email, web-browsing, telnet).
6. Describe how do TCP and UDP work, respectively. What are the main differences in the type of services
that they can deliver? What is the difference in the transport delay involved?
TCP offers connection-oriented reliable services. It includes call set-up and call termination protocols. It also
includes error-control mechanisms based on feed-back and retransmission. For every packet that is delivered,
the sender expects an acknowledgement from the receiver. If no acknowledgement is received before a timeout period, or if negative acknowledgement is received, than the packet will be retransmitted. It also includes
sophisticated flow-control mechanisms to prevent the sender to send too much data to either cause too much
congestion in the router, or buffer overflow at the receiver.
UDP offers connectionless unreliable services. It starts to deliver data packets to the destination without even
attempting to establish a connection. Also, it does not monitor whether a packet is delivered correctly, and
consequently there is no feedback nor retransmission.
Because of the differences in the operations as described above, UDP incur much lower transmission delay
than TCP. When the underlying network has low traffic load and is reliable (i.e. with close to zero bit errors),
then UDP can deliver packets very quickly to the destination. But if the underlying network is congested,
then many packets may be lost and the sender will not even know.
7. What are the main functions of TCP? How is each function accomplished?
1) Connection management to manage connection set-up and termination. This is accomplished through a
three-way handshaking process between the sender and destination.
2) Error control: this is accomplished through having sequence numbers in the segment header, and
monitoring acknowledgement from the destination and retransmit unacknowledged packets after a timeout period.
3) Flow control: this is accomplished by matching the sending rate with the receiver drain rate, based on the
receiver buffer status that is feedback to the sender.
4) Congestion control: This is accomplished by matching the sending rate with the network congestion
status, which is estimated in part based on the time-out events at the sender. (e.g., several consecutive
time out for successive transmitted packets may indicate that the network is congested).
8. List some applications using TCP and some applications using UDP.
Application which require reliable data transfer but does not have a hard constraint on delay can use TCP.
This includes web browsing, email, telnet, and ftp. Applications which can tolerate certain amount of packet
losses but has stringent delay bound can use UDP, for example video streaming.
9. What causes delay and packet losses in a packet switching network?
There are 4 contributing factors for delay: nodal processing, queuing, transmission, and propagation delay.
Loss can occur due to congestion (buffer overflow) or overlong delay (exceeding the delay bound of the
underlying application).
10. Describe how web browsing works? Who is the client? Who is the server? What protocol governs this
application? What transport layer protocol does it use?
In web browsing, the local browser is the client, and the site containing accessed pages is the server. Web
browsing is governed by the HTTP protocol. It uses TCP at the transport layer.
11. What is the difference between non-persistent and persistent HTTP?
With non-persistent HTTP, each time a page or object is accessed, a TCP connection is opened and closed.
With persistent HTTP, objects listed on the same page can be accessed through a single TCP connection.
12. What is the benefit of using client side caching? What are the trade-offs when determining the cache
size?
Client side caching reduces waiting time at the client side. However, too large a cache occupies more
memory space on the host computer.
13. Why would a content provider employs a CDN?
By employing a CDN, the content provider can serve more clients than with a single or a few servers of its
own. The clients will get response faster.
Download