📄 homeworka_chapter1.txt
字号:
Chapter 1
Review Questions
3.A networking program usually has two programs, each running on a different host, communicating with each other. The program that initiates the communication is the client. Typically, the client program requests and receives services from the server program.
4.The Internet provides its applications a connection-oriented service (TCP) and a connectionless service (UDP). Each Internet application makes use of one these two services. The two services will be discussed in detail in Chapter 3.
Some of the principle characteristics of the connection-oriented service are:
a) Two end-systems first "handshake" before either starts to send application data to the other.
b) Provides reliable data transfer, i.e., all application data sent by one side of the connection arrives at the other side of the connection in order and without any gaps.
c) Provides flow control, i.e., it makes sure that neither end of a connection overwhelms the buffers in the other end of the connection by sending to many packets to fast.
d) Provides congestion control, i.e., regulates the amount of data that an application can send into the network, helping to prevent the Internet from entering a state of grid lock.
Some of the principle characteristics of connectionless service are:
a) No handshaking
b) No guarantees of reliable data transfer
c) No flow control or congestion control
5.Flow control and congestion control are two distinct control mechanisms with distinct objectives. Flow control makes sure that neither end of a connection overwhelms the buffers in the other end of the connection by sending to many packets to fast. Congestion control regulates the amount of data that an application can send into the network, helping to prevent congestion in the network core (i.e., in the buffers in the network routers).
6.The Internet's connection-oriented service provides reliable data transfer by using acknowledgements and retransmissions. When one side of the connection doesn't receive an acknowledgement (from the other side of the connection) for a packet it transmitted, it retransmits the packet.
8.In a packet switched network, the packets from different sources flowing on a link do not follow any fixed, pre-defined pattern. In TDM circuit switching, each host gets the same slot in a revolving TDM frame.
9.At time t0 the sending host begins to transmit. At time t1 = L/R1, the sending host completes transmission and the entire packet is received at the router (no propagation delay). Because the router has the entire packet at time t1, it can begin to transmit the packet to the receiving host at time t1. At time t2 = t1 + L/R2, the router completes transmission and the entire packet is received at the receiving host (again, no propagation delay).
Thus, the end-to-end delay is L/R1 + L/R2.
10.In a VC network, each packet switch in the network core maintains connection state information for each VC passing through it. Some of this connection state information is maintained to a VC-number translation table.The forwarding table in the switch need to be modified at the same rate of one per millisecond.
11.The cons of VCs include (i) the need to have a signaling protocol to set-up and tear-down the VCs; (ii) the need to maintain connection state in the packet switches. For the pros, some researchers and engineers argue that it is easier to provide QoS services - such as services that guarantee a minimum transmission rate or services that guarantee maximum end-to-end packet delay – when VCs are used.
14.A POP is a group of one or more routers in an ISPs network at which routers in other ISPs can connect. NAPs are localized networks at which many ISPs (tier-1, tier-2 and lower-tier ISPs) can interconnect.
16.Ethernet LANs have transmission rates of 10 Mbps, 100 Mbps, 1 Gbps and 10 Gbps. For an X Mbps Ethernet (where X = 10, 100, 1,000 or 10,000), a user can continuously transmit at the rate X Mbps if that user is the only person sending data. If there are more than one active user, then each user cannot continuously transmit at X Mbps.
19.The delay components are processing delays, transmission delays, propagation delays, and queuing delays. All of these delays are fixed, except for the queuing delays, which are variable.
20.Five generic tasks are error control, flow control, segmentation and reassembly, multiplexing, and connection setup. Yes, these tasks can be duplicated at different layers. For example, error control is often provided at more than one layer.
21. The five layers in the Internet protocol stack are – from top to bottom – the application layer, the transport layer, the network layer, the link layer, and the physical layer. The principal responsibilities are outlined in Section 1.7.1.
22.
a) application-layer message: data which an application wants to send and passed onto the transport layer;
b) transport-layer segment: generated by the transport layer and encapsulates application-layer message with transport layer header;
c) network-layer datagram: encapsulates transport-layer segment with a network-layer header;
d) link-layer frame: encapsulates network-layer datagram with a link-layer header.
23.Routers process layers 1 through 3. (This is a little bit of a white lie, as modern routers sometimes act as firewalls or caching components, and process layer four as well.) Link layer switches process layers 1 through 2. Hosts process all five layers.
Problems
1.There is no single right answer to this question. Many protocols would do the trick. Here's a simple answer below:
a) Messages from ATM machine to Server
Msg name purpose
-------- -------
HELO <userid> Let server know that there is a card in the ATM machine
ATM card transmits user ID to Server
PASSWD <passwd> User enters PIN, which is sent to server
BALANCE User requests balance
WITHDRAWL <amount> User asks to withdraw money
BYE user all done
b) Messages from Server to ATM machine (display)
Msg name purpose
-------- -------
PASSWD Ask user for PIN (password)
OK last requested operation (PASSWD, WITHDRAWL) OK
ERR last requested operation (PASSWD, WITHDRAWL) in ERROR
AMOUNT <amt> sent in response to BALANCE request
BYE user done, display welcome screen at ATM
c) Correct operation flow
client server
HELO (userid) --------------> (check if valid userid)
<------------- PASSWD
PASSWD <passwd> --------------> (check password)
<------------- OK (password is OK)
BALANCE -------------->
<------------- AMOUNT <amt>
WITHDRAWL <amt> --------------> check if enough $ to cover withdrawl
<------------- OK
ATM dispenses $
BYE -------------->
<------------- BYE
d) In situation when there's not enough money
client server
HELO (userid) --------------> (check if valid userid)
<------------- PASSWD
PASSWD <passwd> --------------> (check password)
<------------- OK (password is OK)
BALANCE -------------->
<------------- AMOUNT <amt>
WITHDRAWL <amt> --------------> check if enough $ to cover withdrawl
<------------- ERR (not enough funds)
error msg displayed
no $ given out
BYE -------------->
<------------- BYE
2.
a) A circuit-switched network would be well suited to the application described, because the application involves long sessions with predictable smooth bandwidth requirements. Since the transmission rate is known and not bursty, bandwidth can be reserved for each application session circuit with no significant waste. In addition, we need not worry greatly about the overhead costs of setting up and tearing down a circuit connection, which are amortized over the lengthy duration of a typical application session.
b) Given such generous link capacities, the network needs no congestion control mechanism. In the worst (most potentially congested) case, all the applications simultaneously transmit over one or more particular network links. However, since each link offers sufficient bandwidth to handle the sum of all of the applications' data rates, no congestion (very little queueing) will occur.
5.
a) The time to transmit one packet onto a link is: (L+h)/R
The time to deliver the packet over Q links is: Q(L+h)/R
Thus the total latency is: ts+Q(L+h)/R
b) Q(L+2h)/R
c) Because there is no store-and-forward delays at the links, the total delay is
ts+(L+h)/R
6.
a) m/s
b) L/R
c) m/s +L/R
d) The last bit is just leaving Host A
e) The first bit is in the link and has not reached Host B
f) The first bit has reached Host B
g) Ls/R=893km
7.
Consider the first bit in a packet,it has:
a) Before this bit can be transmitted, all of the bits in the packet must be generated. This requires:
48x8/64000 = 6 milliseconds
b) The time required to transmit the packet is:
48x8/1000000 = 384 microseconds
c) Propagation delay = 2 milliseconds
d) The delay until decoding is:
6milliseconds + 384microseconds + 2milliseconds = 8.384 milliseconds
A similar analysis shows that all bits experience a delay of 8.384 msec.
10.
The buffer is empty when a batch of N packets arrive because there are N packets simultaneously arrive at the buffer every LN/R seconds and it takes LN/R seconds to transmit the N packets.
So:
The first of the N packets has no queueing delay
The 2nd packet has a queueing delay of L/R seconds
......
The nth packet has a delay of (n-1)L/R seconds
......
The average delay is:
(L/R + 2L/R + 3L/R +...+ (N-1)L/R)/N = L(N-1)/2R
11.
a) The transmission delay is L/R . The total delay is:
IL/R(1-I) + L/R
b) Let x = L/R . The Total delay is:
x/(1-ax)
13.
For Example:
The command under Linux: traceroute -q 20 www.eurecom.fr
The command under windows: tracert -h 20 www.eurecom.fr
20.
a)Time to send message from source host to first packet switch = L/R = 5s . With store-and-forward switching, the total time to move message from source host to destination host = 5x3 =15s.
b)Time to send 1st packet from source host to first packet switch = L/5000R = .001s. Time at which 2nd packet is received at the first switch = time at which 1st packet is received at the second switch = 2x.001 =.002s.
c)Time at which 1st packet is received at the destination host = 3x.001 =.003s. After this,every .001s one packet will be received; thus time at which last (5000th) packet is received = .003 + .001x4999 = 5.002s. It can be seen that delay in using message segmentation is significantly less (almost 1/3rd).
d)Drawbacks:
i.packets have to be put in sequence at the destination.
ii.Message segmentation results in many smaller packets. Since header size is usually the same for all packets regardless of their size, with message segmentation the total amount of header bytes is more.
22.
Time at which the 1st packet is received at the destination = 2(S+40)/R sec. After this, one packet is received at destination every 2(S+40)/R sec. Thus delay in sending the whole file = 2(S+40)/R + (F/s -1)x2(S+40)/R .
To calculate the value of S which leads to the minimum delay.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -