社区
Web 开发
帖子详情
No appropriate node to show Web view for "*****",but the web server has been started
jerrycool
2006-12-07 12:31:16
No appropriate node to show Web view for "*****",but the web server has been started
每当调试时,提示这个,为什么???
****是数据库底层操作的javabean,其它类继承它.
...全文
226
4
打赏
收藏
No appropriate node to show Web view for "*****",but the web server has been started
No appropriate node to show Web view for "*****",but the web server has been started 每当调试时,提示这个,为什么??? ****是数据库底层操作的javabean,其它类继承它.
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
Augustans
2007-02-28
打赏
举报
回复
我是你之後第一個回帖的給分拉:)
jerrycool
2006-12-08
打赏
举报
回复
呀...居然没人想要这50分啊
jerrycool
2006-12-07
打赏
举报
回复
说错了,应该是第三个回帖的
jerrycool
2006-12-07
打赏
举报
回复
解决了,第一个回帖的得全分.嘿嘿
计算机网络第六版答案
Compu
te
r Networking: A Top-Down
App
roach, 6th Edition Solutions to Re
view
Questions and Problems Version Da
te
: May 2012 This document contains the solutions to re
view
questions and problems for the 5th edition of Compu
te
r Networking: A Top-Down
App
roach by Jim Kurose and Keith Ross. These solutions are being made available to instructors ONLY. Please do NOT copy or distribu
te
this document to others (even other instructors). Please do not post any solutions on a publicly-available
Web
si
te
. We’ll be h
app
y to provide a copy (up-to-da
te
) of this solution manual ourselves to anyone who asks. Acknowledgments: Over the years, several students and colleagues have helped us prepare this solutions manual. Special thanks goes to HongGang Zhang, Rakesh Kumar, Prithula Dhungel, and Vijay Annapureddy. Also thanks to all the readers who have made suggestions and correc
te
d
errors. All ma
te
ria
l © copyright 1996-2012 by J.F. Kurose and K.W. Ross. All rights reserved Chap
te
r 1 Re
view
Questions There is no difference. Throughout this
te
xt, the words “host” and “end sys
te
m” are used in
te
rchangeably. End sys
te
ms include PCs, workstations,
Web
server
s, mail
server
s, PDAs, In
te
rnet-connec
te
d
game consoles, etc. From Wikipedia: Diplomatic protocol is commonly described as a set of in
te
rnational cour
te
sy rules. These well-established and time-honored rules have made it easier for nations and people to live and work together. Part of protocol has always been the acknowledgment of the hierarchical standing of all present. Protocol rules are based on the principles of civility. Standards are important for protocols so that people can crea
te
networking sys
te
ms and products that in
te
rop
era
te
. 1. Dial-up modem over
te
lephone line: home; 2. DSL over
te
lephone line: home or small office; 3. Cable to HFC: home; 4. 100 Mbps switched Ethernet: en
te
rprise; 5. Wifi (802.11): home and en
te
rprise: 6. 3G and 4G: wide-area wireless. HFC bandwidth is shared among the users. On the downstream channel, all packets emana
te
from a single source, namely, the head end. Thus, there are no collisions in the downstream channel. In most American cities, the current possibilities include: dial-up; DSL; cable modem; fiber-to-the-home. 7. Ethernet LANs have transmission ra
te
s of 10 Mbps, 100 Mbps, 1 Gbps and 10 Gbps. 8. Today, Ethernet most commonly runs over twis
te
d
-pair copper wire. It also can run over fibers optic links. 9. Dial up modems: up to 56 Kbps, bandwidth is dedica
te
d
; ADSL: up to 24 Mbps downstream and 2.5 Mbps upstream, bandwidth is dedica
te
d
; HFC, ra
te
s up to 42.8 Mbps and upstream ra
te
s of up to 30.7 Mbps, bandwidth is shared. FTTH: 2-10Mbps upload; 10-20 Mbps download; bandwidth is not shared. 10. There are two popular wireless In
te
rnet access
te
chnologies today: Wifi (802.11) In a wireless LAN, wireless users transmit/receive packets to/from an base station (i.e., wireless access point) within a radius of few
te
ns of me
te
rs. The base station is typically connec
te
d
to the wired In
te
rnet and thus serves to connect wireless users to the wired network. 3G and 4G wide-area wireless access networks. In these sys
te
ms, packets are transmit
te
d
over the same wireless infrastructure used for cellular
te
lephony, with the base station thus being managed by a
te
lecommunications provider. This provides wireless access to users within a radius of
te
ns of kilome
te
rs of the base station. 11. At time t0 the sending host begins to transmit. At time t1 = L/R1, the sending host comple
te
s transmission and the entire packet is received at the rou
te
r (no p
rop
agation delay). Because the rou
te
r 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 rou
te
r comple
te
s transmission and the entire packet is received at the receiving host (again, no p
rop
agation delay). Thus, the end-to-end delay is L/R1 + L/R2. 12. A circuit-switched network can guaran
te
e a certain amount of end-to-end bandwidth for the duration of a call. Most packet-switched networks today (including the In
te
rnet) cannot make any end-to-end guaran
te
es for bandwidth. FDM requires sophistica
te
d
analog hardware to shift signal into
app
rop
ria
te
frequency bands. 13. a) 2 users can be suppor
te
d
because each user requires half of the link bandwidth. b) Since each user requires 1Mbps when transmitting, if two or fewer users transmit simultaneously, a maximum of 2Mbps will be required. Since the available bandwidth of the shared link is 2Mbps, there will be no queuing delay before the link. Whereas, if three users transmit simultaneously, the bandwidth required will be 3Mbps which is more than the available bandwidth of the shared link. In this case, there will be queuing delay before the link. c) Probability that a given user is transmitting = 0.2 d) Probability that all three users are transmitting simultaneously = = (0.2)3 = 0.008. Since the queue grows when all the users are transmitting, the fraction of time during which the queue grows (which is equal to the probability that all three users are transmitting simultaneously) is 0.008. 14. If the two ISPs do not peer with each other, then when they send traffic to each other they have to send the traffic through a provider ISP (in
te
rmediary), to which they have to pay for carrying the traffic. By peering with each other directly, the two ISPs can reduce their payments to their provider ISPs. An In
te
rnet Exchange Points (IXP) (typically in a standalone building with its own switches) is a meeting point where multiple ISPs can connect and/or peer together. An ISP earns its money by charging each of the the ISPs that connect to the IXP a relatively small fee, which may depend on the amount of traffic sent to or received from the IXP. 15. Google's priva
te
network connects together all its data cen
te
rs, big and small. Traffic between the Google data cen
te
rs passes over its priva
te
network rather than over the public In
te
rnet. Many of these data cen
te
rs are loca
te
d
in, or close to, lower tier ISPs. Therefore, when Google delivers con
te
nt to a user, it of
te
n can bypass higher tier ISPs. What motiva
te
s con
te
nt providers to crea
te
these networks? First, the con
te
nt provider has more control over the user experience, since it has to use few in
te
rmediary ISPs. Second, it can save money by sending less traffic into provider networks. Third, if ISPs decide to charge more money to highly profitable con
te
nt providers (in countries where net neutrality doesn't
app
ly), the con
te
nt providers can avoid these extra payments. 16. The delay components are processing delays, transmission delays, p
rop
agation delays, and queuing delays. All of these delays are fixed, except for the queuing delays, which are va
ria
ble. 17. a) 1000 km, 1 Mbps, 100 by
te
s b) 100 km, 1 Mbps, 100 by
te
s 18. 10msec; d/s; no; no 19. a) 500 kbps b) 64 seconds c) 100kbps; 320 seconds 20. End sys
te
m A breaks the large file into chunks. It adds header to each chunk, thereby generating multiple packets from the file. The header in each packet includes the IP address of the destination (end sys
te
m B). The packet switch uses the destination IP address in the packet to de
te
rmine the outgoing link. Asking which road to take is analogous to a packet asking which outgoing link it should be forwarded on, given the packet’s destination address. 21. The maximum emission ra
te
is 500 packets/sec and the maximum transmission ra
te
is 350 packets/sec. The corresponding traffic in
te
nsity is 500/350 =1.43 > 1. Loss will eventually occur for each experiment; but the time when loss first occurs will be different from one experiment to the next due to the randomness in the emission process. 22. Five generic tasks are error control, flow control, segmentation and reassembly, multiplexing, and connection setup. Yes, these tasks can be duplica
te
d
at different layers. For example, error control is of
te
n provided at more than one layer. 23. The five layers in the In
te
rnet protocol stack are – from top to bottom – the
app
lication layer, the transport layer, the network layer, the link layer, and the physical layer. The principal responsibilities are outlined in Section 1.5.1. 24.
App
lication-layer message: data which an
app
lication wants to send and passed onto the transport layer; transport-layer segment: genera
te
d
by the transport layer and encapsula
te
s
app
lication-layer message with transport layer header; network-layer datagram: encapsula
te
s transport-layer segment with a network-layer header; link-layer frame: encapsula
te
s network-layer datagram with a link-layer header. 25. Rou
te
rs process network, link and physical layers (layers 1 through 3). (This is a little bit of a whi
te
lie, as modern rou
te
rs sometimes act as firewalls or caching components, and process Transport layer as well.) Link layer switches process link and physical layers (layers 1 through2). Hosts process all five layers. 26. a) Virus Requires some form of human in
te
raction to spread. Classic example: E-mail viruses. b) Worms No user replication needed. Worm in infec
te
d
host scans IP addresses and port numbers, looking for vulnerable processes to infect. 27. Creation of a botnet requires an attacker to find vulnerability in some
app
lication or sys
te
m (e.g. exploiting the buffer overflow vulnerability that might exist in an
app
lication). Af
te
r finding the vulnerability, the attacker needs to scan for hosts that are vulnerable. The
tar
get is basically to compromise a series of sys
te
ms by exploiting that particular vulnerability. Any sys
te
m that is part of the botnet can automatically scan its environment and p
rop
aga
te
by exploiting the vulnerability. An important p
rop
erty of such botnets is that the originator of the botnet can remo
te
ly control and issue commands to all the
node
s in the botnet. Hence, it becomes possible for the attacker to issue a command to all the
node
s, that
tar
get a single
node
(for example, all
node
s in the botnet might be commanded by the attacker to send a TCP SYN message to the
tar
get, which might result in a TCP SYN flood attack at the
tar
get). 28. Trudy can pre
te
nd to be Bob to Alice (and vice-versa) and partially or comple
te
ly modify the message(s) being sent from Bob to Alice. For example, she can easily change the phrase “Alice, I owe you $1000” to “Alice, I owe you $10,000”. Furthermore, Trudy can even d
rop
the packets that are being sent by Bob to Alice (and vise-versa), even if the packets from Bob to Alice are encryp
te
d
. Chap
te
r 1 Problems Problem 1 There is no single right answer to this question. Many protocols would do the trick. Here's a simple answer below: Messages from ATM machine to
Server
Msg name purpose -------- ------- HELO Let
server
know that there is a card in the ATM machine ATM card transmits user ID to
Server
PASSWD User en
te
rs PIN, which is sent to
server
BALANCE User requests balance WITHDRAWL User asks to withdraw money BYE user all done Messages from
Server
to ATM machine (display) Msg name purpose -------- ------- PASSWD Ask user for PIN (password) OK last reques
te
d
operation (PASSWD, WITHDRAWL) OK ERR last reques
te
d
operation (PASSWD, WITHDRAWL) in ERROR AMOUNT sent in response to BALANCE request BYE user done, display welcome screen at ATM Correct operation: client
server
HELO (userid) --------------> (check if valid userid) <------------- PASSWD PASSWD --------------> (check password) <------------- AMOUNT WITHDRAWL --------------> check if enough $ to cover withdrawl (check if valid userid) <------------- PASSWD PASSWD --------------> (check password) <------------- AMOUNT WITHDRAWL --------------> check if enough $ to cover withdrawl <------------- BYE Problem 2 At time N*(L/R) the first packet has reached the destination, the second packet is stored in the last rou
te
r, the third packet is stored in the next-to-last rou
te
r, etc. At time N*(L/R) + L/R, the second packet has reached the destination, the third packet is stored in the last rou
te
r, etc. Continuing with this logic, we see that at time N*(L/R) + (P-1)*(L/R) = (N+P-1)*(L/R) all packets have reached the destination. Problem 3 a) A circuit-switched network would be well sui
te
d
to the
app
lication, because the
app
lication involves long sessions with predictable smooth bandwidth requirements. Since the transmission ra
te
is known and not bursty, bandwidth can be reserved for each
app
lication session without significant was
te
. In addition, the overhead costs of setting up and
te
aring down connections are amortized over the lengthy duration of a typical
app
lication session. b) In the worst case, all the
app
lications simultaneously transmit over one or more network links. However, since each link has sufficient bandwidth to handle the sum of all of the
app
lications' data ra
te
s, no congestion (very little queuing) will occur. Given such generous link capacities, the network does not need congestion control mechanisms. Problem 4 Between the switch in the upper left and the switch in the upper right we can have 4 connections. Similarly we can have four connections between each of the 3 other pairs of adjacent switches. Thus, this network can support up to 16 connections. We can 4 connections passing through the switch in the upper-right-hand corner and another 4 connections passing through the switch in the lower-left-hand corner, giving a total of 8 connections. Yes. For the connections between A and C, we rou
te
two connections through B and two connections through D. For the connections between B and D, we rou
te
two connections through A and two connections through C. In this manner, there are at most 4 connections passing through any link. Problem 5 Tollbooths are 75 km apart, and the cars p
rop
aga
te
at 100km/hr. A tollbooth services a car at a ra
te
of one car every 12 seconds. a) There are
te
n cars. It takes 120 seconds, or 2 minu
te
s, for the first tollbooth to service the 10 cars. Each of these cars has a p
rop
agation delay of 45 minu
te
s (travel 75 km) before arriving at the second tollbooth. Thus, all the cars are lined up before the second tollbooth af
te
r 47 minu
te
s. The whole process repeats itself for traveling between the second and third tollbooths. It also takes 2 minu
te
s for the third tollbooth to service the 10 cars. Thus the total delay is 96 minu
te
s. b) Delay between tollbooths is 8*12 seconds plus 45 minu
te
s, i.e., 46 minu
te
s and 36 seconds. The total delay is twice this amount plus 8*12 seconds, i.e., 94 minu
te
s and 48 seconds. Problem 6 a) seconds. b) seconds. c) seconds. d) The 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) Want km. Problem 7 Consider the first bit in a packet. Before this bit can be transmit
te
d
, all of the bits in the packet must be genera
te
d
. This requires sec=7msec. The time required to transmit the packet is sec= sec. P
rop
agation delay = 10 msec. The delay until decoding is 7msec + sec + 10msec = 17.224msec A similar analysis shows that all bits experience a delay of 17.224 msec. Problem 8 a) 20 users can be suppor
te
d
. b) . c) . d) . We use the central limit theorem to
app
roxima
te
this probability. Let be independent random va
ria
bles such that . “21 or more users” when is a standard normal r.v. Thus “21 or more users” . Problem 9 10,000 Problem 10 The first end sys
te
m requires L/R1 to transmit the packet onto the first link; the packet p
rop
aga
te
s over the first link in d1/s1; the packet switch adds a processing delay of dproc; af
te
r receiving the entire packet, the packet switch connecting the first and the second link requires L/R2 to transmit the packet onto the second link; the packet p
rop
aga
te
s over the second link in d2/s2. Similarly, we can find the delay caused by the second switch and the third link: L/R3, dproc, and d3/s3. Adding these five delays gives dend-end = L/R1 + L/R2 + L/R3 + d1/s1 + d2/s2 + d3/s3+ dproc+ dproc To answer the second question, we simply plug the values into the equation to get 6 + 6 + 6 + 20+16 + 4 + 3 + 3 = 64 msec. Problem 11 Because bits are immedia
te
ly transmit
te
d
, the packet switch does not introduce any delay; in particular, it does not introduce a transmission delay. Thus, dend-end = L/R + d1/s1 + d2/s2+ d3/s3 For the values in Problem 10, we get 6 + 20 + 16 + 4 = 46 msec. Problem 12 The arriving packet must first wait for the link to transmit 4.5 *1,500 by
te
s = 6,750 by
te
s or 54,000 bits. Since these bits are transmit
te
d
at 2 Mbps, the queuing delay is 27 msec. Generally, the queuing delay is (nL + (L - x))/R. Problem 13 The queuing delay is 0 for the first transmit
te
d
packet, L/R for the second transmit
te
d
packet, and generally, (n-1)L/R for the nth transmit
te
d
packet. Thus, the average delay for the N packets is: (L/R + 2L/R + ....... + (N-1)L/R)/N = L/(RN) * (1 + 2 + ..... + (N-1)) = L/(RN) * N(N-1)/2 = LN(N-1)/(2RN) = (N-1)L/(2R) No
te
that here we used the well-known fact: 1 + 2 + ....... + N = N(N+1)/2 It takes seconds to transmit the packets. Thus, the buffer is empty when a each batch of packets arrive. Thus, the average delay of a packet across all batches is the average delay within one batch, i.e., (N-1)L/2R. Problem 14 The transmission delay is . The total delay is Let . Total delay = For x=0, the total delay =0; as we increase x, total delay increases,
app
roaching infinity as x
app
roaches 1/a. Problem 15 Total delay . Problem 16 The total number of packets in the sys
te
m includes those in the buffer and the packet that is being transmit
te
d
. So, N=10+1. Because , so (10+1)=a*(queuing delay + transmission delay). That is, 11=a*(0.01+1/100)=a*(0.01+0.01). Thus, a=550 packets/sec. Problem 17 There are
node
s (the source host and the rou
te
rs). Let deno
te
the processing delay at the th
node
. Let be the transmission ra
te
of the th link and let . Let be the p
rop
agation delay across the th link. Then . Let deno
te
the average queuing delay at
node
. Then . Problem 18 On linux you can use the command tracerou
te
www.
tar
gethost.com and in the Windows command prompt you can use tracert www.
tar
gethost.com In either case, you will get three delay measurements. For those three measurements you can calcula
te
the mean and standard deviation. Repeat the experiment at different times of the day and comment on any changes. Here is an example solution: Tracerou
te
s between San Diego Super Compu
te
r Cen
te
r and www.poly.edu The average (mean) of the round-trip delays at each of the three hours is 71.18 ms, 71.38 ms and 71.55 ms, respectively. The standard deviations are 0.075 ms, 0.21 ms, 0.05 ms, respectively. In this example, the tracerou
te
s have 12 rou
te
rs in the path at each of the three hours. No, the paths didn’t change during any of the hours. Tracerou
te
packets passed through four ISP networks from source to destination. Yes, in this experiment the largest delays occurred at peering in
te
rfaces between adjacent ISPs. Tracerou
te
s from www.s
te
lla-net.net (France) to www.poly.edu (USA). The average round-trip delays at each of the three hours are 87.09 ms, 86.35 ms and 86.48 ms, respectively. The standard deviations are 0.53 ms, 0.18 ms, 0.23 ms, respectively. In this example, there are 11 rou
te
rs in the path at each of the three hours. No, the paths didn’t change during any of the hours. Tracerou
te
packets passed three ISP networks from source to destination. Yes, in this experiment the largest delays occurred at peering in
te
rfaces between adjacent ISPs. Problem 19 An example solution: Tracerou
te
s from two different cities in France to New York City in Uni
te
d
Sta
te
s In these tracerou
te
s from two different cities in France to the same destination host in Uni
te
d
Sta
te
s, seven links are in common including the transatlantic link. In this example of tracerou
te
s from one city in France and from another city in Germany to the same host in Uni
te
d
Sta
te
s, three links are in common including the transatlantic link. Tracerou
te
s to two different cities in China from same host in Uni
te
d
Sta
te
s Five links are common in the two tracerou
te
s. The two tracerou
te
s diverge before reaching China Problem 20 Throughput = min{Rs, Rc, R/M} Problem 21 If only use one path, the max throughput is given by: . If use all paths, the max throughput is given by . Problem 22 Probability of successfully receiving a packet is: ps= (1-p)N. The number of transmissions needed to be performed until the packet is successfully received by the client is a geometric random va
ria
ble with success probability ps. Thus, the average number of transmissions needed is given by: 1/ps . Then, the average number of re-transmissions needed is given by: 1/ps -1. Problem 23 Let’s call the first packet A and call the second packet B. If the bottleneck link is the first link, then packet B is queued at the first link waiting for the transmission of packet A. So the packet in
te
r-arrival time at the destination is simply L/Rs. If the second link is the bottleneck link and both packets are sent back to back, it must be true that the second packet arrives at the input queue of the second link before the second link finishes the transmission of the first packet. That is, L/Rs + L/Rs + dp
rop
= L/Rs + dp
rop
+ L/Rc Thus, the minimum value of T is L/Rc L/Rs . Problem 24 40
te
raby
te
s = 40 * 1012 * 8 bits. So, if using the dedica
te
d
link, it will take 40 * 1012 * 8 / (100 *106 ) =3200000 seconds = 37 days. But with FedEx overnight delivery, you can guaran
te
e the data arrives in one day, and it should cost less than $100. Problem 25 160,000 bits 160,000 bits The bandwidth-delay product of a link is the maximum number of bits that can be in the link. the width of a bit = length of link / bandwidth-delay product, so 1 bit is 125 me
te
rs long, which is longer than a football field s/R Problem 26 s/R=20000km, then R=s/20000km= 2.5*108/(2*107)= 12.5 bps Problem 27 80,000,000 bits 800,000 bits, this is because that the maximum number of bits that will be in the link at any given time = min(bandwidth delay product, packet size) = 800,000 bits. .25 me
te
rs Problem 28 ttrans + tp
rop
= 400 msec + 80 msec = 480 msec. 20 * (ttrans + 2 tp
rop
) = 20*(20 msec + 80 msec) = 2 sec. Breaking up a file takes longer to transmit because each data packet and its corresponding acknowledgement packet add their own p
rop
agation delays. Problem 29 Recall geostationary sa
te
lli
te
is 36,000 kilome
te
rs away from earth surface. 150 msec 1,500,000 bits 600,000,000 bits Problem 30 Let’s suppose the passenger and his/her bags correspond to the data unit arriving to the top of the protocol stack. When the passenger checks in, his/her bags are checked, and a tag is attached to the bags and ticket. This is additional information added in the Baggage layer if Figure 1.20 that allows the Baggage layer to implement the service or separating the passengers and baggage on the sending side, and then reuniting them (hopefully!) on the destination side. When a passenger then passes through security and additional stamp is of
te
n added to his/her ticket, indicating that the passenger has passed through a security check. This information is used to ensure (e.g., by la
te
r checks for the security information) secure transfer of people. Problem 31 Time to send message from source host to first packet switch = With store-and-forward switching, the total time to move message from source host to destination host = Time to send 1st packet from source host to first packet switch = . . Time at which 2nd packet is received at the first switch = time at which 1st packet is received at the second switch = Time at which 1st packet is received at the destination host = . Af
te
r this, every 5msec one packet will be received; thus time at which last (800th) packet is received = . It can be seen that delay in using message segmentation is significantly less (almost 1/3rd). Without message segmentation, if bit errors are not tolera
te
d
, if there is a single bit error, the whole message has to be retransmit
te
d
(rather than a single packet). Without message segmentation, huge packets (containing HD videos, for example) are sent into the network. Rou
te
rs have to accommoda
te
these huge packets. Smaller packets have to queue behind enormous packets and suffer unfair delays. Packets have to be put in sequence at the destination. 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 by
te
s is more. Problem 32 Yes, the delays in the
app
let correspond to the delays in the Problem 31.The p
rop
agation delays affect the overall end-to-end delays both for packet switching and message switching equally. Problem 33 There are F/S packets. Each packet is S=80 bits. Time at which the last packet is received at the first rou
te
r is sec. At this time, the first F/S-2 packets are at the destination, and the F/S-1 packet is at the second rou
te
r. The last packet must then be transmit
te
d
by the first rou
te
r and the second rou
te
r, with each transmission taking sec. Thus delay in sending the whole file is To calcula
te
the value of S which leads to the minimum delay, Problem 34 The circuit-switched
te
lephone networks and the In
te
rnet are connec
te
d
together at "ga
te
ways". When a Skype user (connec
te
d
to the In
te
rnet) calls an ordinary
te
lephone, a circuit is established between a ga
te
way and the
te
lephone user over the circuit switched network. The skype user's voice is sent in packets over the In
te
rnet to the ga
te
way. At the ga
te
way, the voice signal is reconstruc
te
d
and then sent over the circuit. In the other direction, the voice signal is sent over the circuit switched network to the ga
te
way. The ga
te
way packetizes the voice signal and sends the voice packets to the Skype user. Chap
te
r 2 Re
view
Questions The
Web
: HTTP; file transfer: FTP; remo
te
login:
Te
lnet; e-mail: SMTP; BitTorrent file sharing: BitTorrent protocol Network archi
te
cture refers to the organization of the communication process into layers (e.g., the five-layer In
te
rnet archi
te
cture).
App
lication archi
te
cture, on the other hand, is designed by an
app
lication developer and dicta
te
s the broad structure of the
app
lication (e.g., client-
server
or P2P). The process which initia
te
s the communication is the client; the process that waits to be contac
te
d
is the
server
. No. In a P2P file-sharing
app
lication, the peer that is receiving a file is typically the client and the peer that is sending the file is typically the
server
. The IP address of the destination host and the port number of the socket in the destination process. You would use UDP. With UDP, the transaction can be comple
te
d
in one roundtrip time (RTT) - the client sends the transaction request into a UDP socket, and the
server
sends the reply back to the client's UDP socket. With TCP, a minimum of two RTTs are needed - one to set-up the TCP connection, and another for the client to send the request, and for the
server
to send back the reply. One such example is remo
te
word processing, for example, with Google docs. However, because Google docs runs over the In
te
rnet (using TCP), timing guaran
te
es are not provided. a) Reliable data transfer TCP provides a reliable by
te
-stream between client and
server
but UDP does not. b) A guaran
te
e that a certain value for throughput will be maintained Neither c) A guaran
te
e that data will be delivered within a specified amount of time Neither d) Confidentiality (via encryption) Neither SSL opera
te
s at the
app
lication layer. The SSL socket takes unencryp
te
d
data from the
app
lication layer, encrypts it and then passes it to the TCP socket. If the
app
lication developer wants TCP to be enhanced with SSL, she has to include the SSL code in the
app
lication. A protocol uses handshaking if the two communicating entities first exchange control packets before sending data to each other. SMTP uses handshaking at the
app
lication layer whereas HTTP does not. The
app
lications associa
te
d
with those protocols require that all
app
lication data be received in the correct order and without gaps. TCP provides this service whereas UDP does not. When the user first visits the si
te
, the
server
crea
te
s a unique identification number, crea
te
s an entry in its back-end database, and returns this identification number as a cookie number. This cookie number is stored on the user’s host and is managed by the browser. During each subsequent visit (and purchase), the browser sends the cookie number back to the si
te
. Thus the si
te
knows when this user (more precisely, this browser) is visiting the si
te
.
Web
caching can bring the desired con
te
nt “closer” to the user, possibly to the same LAN to which the user’s host is connec
te
d
.
Web
caching can reduce the delay for all objects, even objects that are not cached, since caching reduces the traffic on links.
Te
lnet is not available in Windows 7 by default. to make it available, go to Control Panel, Programs and Features, Turn Windows Features On or Off, Check
Te
lnet client. To s
tar
t
Te
lnet, in Windows command prompt, issue the following command >
te
lnet
web
server
ver 80 where "
web
server
" is some
web
server
. Af
te
r issuing the command, you have established a TCP connection between your client
te
lnet program and the
web
server
. Then type in an HTTP GET message. An example is given below: Since the index.html page in this
web
server
was not modified since Fri, 18 May 2007 09:23:34 GMT, and the above commands were issued on Sat, 19 May 2007, the
server
returned "304 Not Modified". No
te
that the first 4 lines are the GET message and header lines inpu
te
d
by the user, and the next 4 lines (s
tar
ting from HTTP/1.1 304 Not Modified) is the response from the
web
server
. FTP uses two parallel TCP connections, one connection for sending control information (such as a request to transfer a file) and another connection for actually transferring the file. Because the control information is not sent over the same connection that the file is sent over, FTP sends control information out of band. The message is first sent from Alice’s host to her mail
server
over HTTP. Alice’s mail
server
then sends the message to Bob’s mail
server
over SMTP. Bob then transfers the message from his mail
server
to his host over POP3. 17. Received: from 65.54.246.203 (EHLO bay0-omc3-s3.bay0.hotmail.com) (65.54.246.203) by mta419.mail.mud.yahoo.com with SMTP; Sat, 19 May 2007 16:53:51 -0700 Received: from hotmail.com ([65.55.135.106]) by bay0-omc3-s3.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Sat, 19 May 2007 16:52:42 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 19 May 2007 16:52:41 -0700 Message-ID: Received: from 65.55.135.123 by by130fd.bay130.hotmail.msn.com with HTTP; Sat, 19 May 2007 23:52:36 GMT From: "prithula dhungel" To: prithula@yahoo.com Bcc: Subject:
Te
st mail Da
te
: Sat, 19 May 2007 23:52:36 +0000 Mime-Version: 1.0 Con
te
nt-Type:
Te
xt/html; format=flowed Return-Path: prithuladhungel@hotmail.com Figure: A sample mail message header Received: This header field indica
te
s the sequence in which the SMTP
server
s send and receive the mail message including the respective timestamps. In this example there are 4 “Received:” header lines. This means the mail message passed through 5 different SMTP
server
s before being delivered to the receiver’s mail box. The last (forth) “Received:” header indica
te
s the mail message flow from the SMTP
server
of the sender to the second SMTP
server
in the chain of
server
s. The sender’s SMTP
server
is at address 65.55.135.123 and the second SMTP
server
in the chain is by130fd.bay130.hotmail.msn.com. The third “Received:” header indica
te
s the mail message flow from the second SMTP
server
in the chain to the third
server
, and so on. Finally, the first “Received:” header indica
te
s the flow of the mail messages from the forth SMTP
server
to the last SMTP
server
(i.e. the receiver’s mail
server
) in the chain. Message-id: The message has been given this number BAY130-F26D9E35BF59E0D18A819AFB9310@phx.gbl (by bay0-omc3-s3.bay0.hotmail.com. Message-id is a unique string assigned by the mail sys
te
m when the message is first crea
te
d
. From: This indica
te
s the email address of the sender of the mail. In the given example, the sender is “prithuladhungel@hotmail.com” To: This field indica
te
s the email address of the receiver of the mail. In the example, the receiver is “prithula@yahoo.com” Subject: This gives the subject of the mail (if any specified by the sender). In the example, the subject specified by the sender is “
Te
st mail” Da
te
: The da
te
and time when the mail was sent by the sender. In the example, the sender sent the mail on 19th May 2007, at time 23:52:36 GMT. Mime-version: MIME version used for the mail. In the example, it is 1.0. Con
te
nt-type: The type of con
te
nt in the body of the mail message. In the example, it is “
te
xt/html”. Return-Path: This specifies the email address to which the mail will be sent if the receiver of this mail wants to reply to the sender. This is also used by the sender’s mail
server
for bouncing back undeliverable mail messages of mailer-daemon error messages. In the example, the return path is “prithuladhungel@hotmail.com”. With download and dele
te
, af
te
r a user retrieves its messages from a POP
server
, the messages are dele
te
d
. This poses a problem for the nomadic user, who may want to access the messages from many different machines (office PC, home PC, etc.). In the download and keep configuration, messages are not dele
te
d
af
te
r the user retrieves the messages. This can also be inconvenient, as each time the user retrieves the stored messages from a new machine, all of non-dele
te
d
messages will be transferred to the new machine (including very old messages). Yes an organization’s mail
server
and
Web
server
can have the same alias for a host name. The MX record is used to map the mail
server
’s host name to its IP address. You should be able to see the sender's IP address for a user with an .edu email address. But you will not be able to see the sender's IP address if the user uses a gmail account. It is not necessary that Bob will also provide chunks to Alice. Alice has to be in the top 4 neighbors of Bob for Bob to send out chunks to her; this might not occur even if Alice provides chunks to Bob throughout a 30-second in
te
rval. Recall that in BitTorrent, a peer picks a random peer and optimistically unchokes the peer for a short period of time. Therefore, Alice will eventually be optimistically unchoked by one of her neighbors, during which time she will receive chunks from that neighbor. The overlay network in a P2P file sharing sys
te
m consists of the
node
s participating in the file sharing sys
te
m and the logical links between the
node
s. There is a logical link (an “edge” in graph theory
te
rms) from
node
A to
node
B if there is a semi-permanent TCP connection between A and B. An overlay network does not include rou
te
rs. Mesh DHT: The advantage is in order to a rou
te
a message to the peer (with ID) that is closest to the key, only one hop is required; the disadvantage is that each peer must track all other peers in the DHT. Circular DHT: the advantage is that each peer needs to track only a few other peers; the disadvantage is that O(N) hops are needed to rou
te
a message to the peer that is closest to the key. 25. File Distribution Instant Messaging Video Streaming Distribu
te
d
Computing With the UDP
server
, there is no welcoming socket, and all data from different clients en
te
rs the
server
through this one socket. With the TCP
server
, there is a welcoming socket, and each time a client initia
te
s a connection to the
server
, a new socket is crea
te
d
. Thus, to support n simultaneous connections, the
server
would need n+1 sockets. For the TCP
app
lication, as soon as the client is execu
te
d
, it at
te
mpts to initia
te
a TCP connection with the
server
. If the TCP
server
is not running, then the client will fail to make a connection. For the UDP
app
lication, the client does not initia
te
connections (or at
te
mpt to communica
te
with the UDP
server
) immedia
te
ly upon execution Chap
te
r 2 Problems Problem 1 a) F b) T c) F d) F e) F Problem 2 Access control commands: USER, PASS, ACT, CWD, CDUP, SMNT, REIN, QUIT. Transfer parame
te
r commands: PORT, PASV, TYPE STRU, MODE. Service commands: RETR, STOR, STOU,
APP
E, ALLO, REST, RNFR, RNTO, ABOR, DELE, RMD, MRD, PWD, LIST, NLST, SI
TE
, SYST, STAT, HELP, NOOP. Problem 3
App
lication layer protocols: DNS and HTTP Transport layer protocols: UDP for DNS; TCP for HTTP Problem 4 The document request was http://gaia.cs.umass.edu/cs453/index.html. The Host : field indica
te
s the
server
's name and /cs453/index.html indica
te
s the file name. The browser is running HTTP version 1.1, as indica
te
d
just before the first pair. The browser is requesting a persis
te
nt connection, as indica
te
d
by the Connection: keep-alive. This is a trick question. This information is not contained in an HTTP message anywhere. So there is no way to
te
ll this from looking at the exchange of HTTP messages alone. One would need information from the IP datagrams (that carried the TCP segment that carried the HTTP GET request) to answer this question. Mozilla/5.0. The browser type information is needed by the
server
to send different versions of the same object to different types of browsers. Problem 5 The status code of 200 and the phrase OK indica
te
that the
server
was able to loca
te
the document successfully. The reply was provided on Tuesday, 07 Mar 2008 12:39:45 Greenwich Mean Time. The document index.html was last modified on Saturday 10 Dec 2005 18:27:46 GMT. There are 3874 by
te
s in the document being returned. The first five by
te
s of the returned document are : server agreed to a persis
te
nt connection, as indica
te
d
by the Connection: Keep-Alive field Problem 6 Persis
te
nt connections are discussed in section 8 of RFC 2616 (the real goal of this question was to get you to retrieve and read an RFC). Sections 8.1.2 and 8.1.2.1 of the RFC indica
te
that either the client or the
server
can indica
te
to the other that it is going to close the persis
te
nt connection. It does so by including the connection-token "close" in the Connection-header field of the http request/reply. HTTP does not provide any encryption services. (From RFC 2616) “Clients that use persis
te
nt connections should limit the number of simultaneous connections that they maintain to a given
server
. A single-user client SHOULD NOT maintain more than 2 connections with any
server
or proxy.” Yes. (From RFC 2616) “A client might have s
tar
te
d
to send a new request at the same time that the
server
has decided to close the "idle" connection. From the
server
's point of
view
, the connection is being closed while it was idle, but from the client's point of
view
, a request is in progress.” Problem 7 The total amount of time to get the IP address is . Once the IP address is known, elapses to set up the TCP connection and another elapses to request and receive the small object. The total response time is Problem 8 . . Problem 9 The time to transmit an object of size L over a link or ra
te
R is L/R. The average time is the average size of the object divided by R: = (850,000 bits)/(15,000,000 bits/sec) = .0567 sec The traffic in
te
nsity on the link is given by =(16 requests/sec)(.0567 sec/request) = 0.907. Thus, the average access delay is (.0567 sec)/(1 - .907) .6 seconds. The total average response time is therefore .6 sec + 3 sec = 3.6 sec. The traffic in
te
nsity on the access link is reduced by 60% since the 60% of the requests are satisfied within the institutional network. Thus the average access delay is (.0567 sec)/[1 – (.4)(.907)] = .089 seconds. The response time is
app
roxima
te
ly zero if the request is satisfied by the cache (which h
app
ens with probability .6); the average response time is .089 sec + 3 sec = 3.089 sec for cache misses (which h
app
ens 40% of the time). So the average response time is (.6)(0 sec) + (.4)(3.089 sec) = 1.24 seconds. Thus the average response time is reduced from 3.6 sec to 1.24 sec. Problem 10 No
te
that each downloaded object can be comple
te
ly put into one data packet. Let Tp deno
te
the one-way p
rop
agation delay between the client and the
server
. First consider parallel downloads using non-persis
te
nt connections. Parallel downloads would allow 10 connections to share the 150 bits/sec bandwidth, giving each just 15 bits/sec. Thus, the total time needed to receive all objects is given by: (200/150+Tp + 200/150 +Tp + 200/150+Tp + 100,000/150+ Tp ) + (200/(150/10)+Tp + 200/(150/10) +Tp + 200/(150/10)+Tp + 100,000/(150/10)+ Tp ) = 7377 + 8*Tp (seconds) Now consider a persis
te
nt HTTP connection. The total time needed is given by: (200/150+Tp + 200/150 +Tp + 200/150+Tp + 100,000/150+ Tp ) + 10*(200/150+Tp + 100,000/150+ Tp ) =7351 + 24*Tp (seconds) Assuming the speed of light is 300*106 m/sec, then Tp=10/(300*106)=0.03 microsec. Tp is therefore negligible compared with transmission delay. Thus, we see that persis
te
nt HTTP is not significantly fas
te
r (less than 1 percent) than the non-persis
te
nt case with parallel download. Problem 11 Yes, because Bob has more connections, he can get a larger share of the link bandwidth. Yes, Bob still needs to perform parallel downloads; otherwise he will get less bandwidth than the other four users. Problem 12
Server
.py from socket import *
server
Port=12000
server
Socket=socket(AF_INET,SOCK_STREAM)
server
Socket.bind(('',
server
Port))
server
Socket.lis
te
n(1) connectionSocket, addr =
server
Socket.accept() while 1: sen
te
nce = connectionSocket.recv(1024) print 'From
Server
:', sen
te
nce, '\n'
server
Socket.close() Problem 13 The MAIL FROM: in SMTP is a message from the SMTP client that identifies the sender of the mail message to the SMTP
server
. The From: on the mail message itself is NOT an SMTP message, but rather is just a line in the body of the mail message. Problem 14 SMTP uses a line containing only a period to mark the end of a message body. HTTP uses “Con
te
nt-Length header field” to indica
te
the length of a message body. No, HTTP cannot use the method used by SMTP, because HTTP message could be binary data, whereas in SMTP, the message body must be in 7-bit ASCII format. Problem 15 MTA stands for Mail Transfer Agent. A host sends the message to an MTA. The message then follows a sequence of MTAs to reach the receiver’s mail reader. We see that this spam message follows a chain of MTAs. An honest MTA should report where it receives the message. Notice that in this message, “asusus-4b96 ([58.88.21.177])” does not report from where it received the email. Since we assume only the originator is dishonest, so “asusus-4b96 ([58.88.21.177])” must be the originator. Problem 16 UIDL abbrevia
te
s “unique-ID listing”. When a POP3 client issues the UIDL command, the
server
responds with the unique message ID for all of the messages present in the user's mailbox. This command is useful for “download and keep”. By maintaining a file that lists the messages retrieved during earlier sessions, the client can use the UIDL command to de
te
rmine which messages on the
server
have already been seen. Problem 17 a) C: dele 1 C: retr 2 S: (blah blah … S: ………..blah) S: . C: dele 2 C: quit S: +OK POP3
server
signing off b) C: retr 2 S: blah blah … S: ………..blah S: . C: quit S: +OK POP3
server
signing off C: list S: 1 498 S: 2 912 S: . C: retr 1 S: blah ….. S: ….blah S: . C: retr 2 S: blah blah … S: ………..blah S: . C: quit S: +OK POP3
server
signing off Problem 18 For a given input of domain name (such as ccn.com), IP address or network administrator name, the whois database can be used to loca
te
the corresponding registrar, whois
server
, DNS
server
, and so on. NS4.YAHOO.COM from www.regis
te
r.com; NS1.MSFT.NET from ww.regis
te
r.com Local Domain: www.mindspring.com
Web
server
s : www.mindspring.com 207.69.189.21, 207.69.189.22, 207.69.189.23, 207.69.189.24, 207.69.189.25, 207.69.189.26, 207.69.189.27, 207.69.189.28 Mail
Server
s : mx1.mindspring.com (207.69.189.217) mx2.mindspring.com (207.69.189.218) mx3.mindspring.com (207.69.189.219) mx4.mindspring.com (207.69.189.220) Name
Server
s: itchy.earthlink.net (207.69.188.196) scratchy.earthlink.net (207.69.188.197) www.yahoo.com
Web
Server
s: www.yahoo.com (216.109.112.135, 66.94.234.13) Mail
Server
s: a.mx.mail.yahoo.com (209.191.118.103) b.mx.mail.yahoo.com (66.196.97.250) c.mx.mail.yahoo.com (68.142.237.182, 216.39.53.3) d.mx.mail.yahoo.com (216.39.53.2) e.mx.mail.yahoo.com (216.39.53.1) f.mx.mail.yahoo.com (209.191.88.247, 68.142.202.247) g.mx.mail.yahoo.com (209.191.88.239, 206.190.53.191) Name
Server
s: ns1.yahoo.com (66.218.71.63) ns2.yahoo.com (68.142.255.16) ns3.yahoo.com (217.12.4.104) ns4.yahoo.com (68.142.196.63) ns5.yahoo.com (216.109.116.17) ns8.yahoo.com (202.165.104.22) ns9.yahoo.com (202.160.176.146) www.hotmail.com
Web
Server
s: www.hotmail.com (64.4.33.7, 64.4.32.7) Mail
Server
s: mx1.hotmail.com (65.54.245.8, 65.54.244.8, 65.54.244.136) mx2.hotmail.com (65.54.244.40, 65.54.244.168, 65.54.245.40) mx3.hotmail.com (65.54.244.72, 65.54.244.200, 65.54.245.72) mx4.hotmail.com (65.54.244.232, 65.54.245.104, 65.54.244.104) Name
Server
s: ns1.msft.net (207.68.160.190) ns2.msft.net (65.54.240.126) ns3.msft.net (213.199.161.77) ns4.msft.net (207.46.66.126) ns5.msft.net (65.55.238.126) d) The yahoo
web
server
has multiple IP addresses www.yahoo.com (216.109.112.135, 66.94.234.13) e) The address range for Poly
te
chnic University: 128.238.0.0 – 128.238.255.255 f) An attacker can use the whois database and nslookup tool to de
te
rmine the IP address ranges, DNS
server
addresses, etc., for the
tar
get institution. By analyzing the source address of attack packets, the victim can use whois to obtain information about domain from which the attack is coming and possibly inform the administrators of the origin domain. Problem 19 The following delegation chain is used for gaia.cs.umass.edu a.root-
server
s.net E.GTLD-
SERVER
S.NET ns1.umass.edu(authoritative) First command: dig +norecurse @a.root-
server
s.net any gaia.cs.umass.edu ;; AUTHORITY SECTION: edu. 172800 IN NS E.GTLD-
SERVER
S.NET. edu. 172800 IN NS A.GTLD-
SERVER
S.NET. edu. 172800 IN NS G3.NSTLD.COM. edu. 172800 IN NS D.GTLD-
SERVER
S.NET. edu. 172800 IN NS H3.NSTLD.COM. edu. 172800 IN NS L3.NSTLD.COM. edu. 172800 IN NS M3.NSTLD.COM. edu. 172800 IN NS C.GTLD-
SERVER
S.NET. Among all returned edu DNS
server
s, we send a query to the first one. dig +norecurse @E.GTLD-
SERVER
S.NET any gaia.cs.umass.edu umass.edu. 172800 IN NS ns1.umass.edu. umass.edu. 172800 IN NS ns2.umass.edu. umass.edu. 172800 IN NS ns3.umass.edu. Among all three returned authoritative DNS
server
s, we send a query to the first one. dig +norecurse @ns1.umass.edu any gaia.cs.umass.edu gaia.cs.umass.edu. 21600 IN A 128.119.245.12 The answer for google.com could be: a.root-
server
s.net E.GTLD-
SERVER
S.NET ns1.google.com(authoritative) Problem 20 We can periodically take a snapshot of the DNS caches in the local DNS
server
s. The
Web
server
that
app
ears most frequently in the DNS caches is the most popular
server
. This is because if more users are in
te
res
te
d
in a
Web
server
, then DNS requests for that
server
are more frequently sent by users. Thus, that
Web
server
will
app
ear in the DNS caches more frequently. For a comple
te
measurement study, see: Craig E. Wills, Mikhail Mikhailov, Hao Shang “Inferring Relative Popularity of In
te
rnet
App
lications by Actively Querying DNS Caches”, in IMC'03, October 2729, 2003, Miami Beach, Florida, USA Problem 21 Yes, we can use dig to query that
Web
si
te
in the local DNS
server
. For example, “dig cnn.com” will return the query time for finding cnn.com. If cnn.com was just accessed a couple of seconds ago, an entry for cnn.com is cached in the local DNS cache, so the query time is 0 msec. Otherwise, the query time is large. Problem 22 For calculating the minimum distribution time for client-
server
distribution, we use the following formula: Dcs = max {NF/us, F/dmin} Similarly, for calculating the minimum distribution time for P2P distribution, we use the following formula: Where, F = 15 Gbits = 15 * 1024 Mbits us = 30 Mbps dmin = di = 2 Mbps No
te
, 300Kbps = 300/1024 Mbps. Client
Server
N 10 100 1000 u 300 Kbps 7680 51200 512000 700 Kbps 7680 51200 512000 2 Mbps 7680 51200 512000 Peer to Peer N 10 100 1000 u 300 Kbps 7680 25904 47559 700 Kbps 7680 15616 21525 2 Mbps 7680 7680 7680 Problem 23 Consider a distribution scheme in which the
server
sends the file to each client, in parallel, at a ra
te
of a ra
te
of us/N. No
te
that this ra
te
is less than each of the client’s download ra
te
, since by assumption us/N ≤ dmin. Thus each client can also receive at ra
te
us/N. Since each client receives at ra
te
us/N, the time for each client to receive the entire file is F/( us/N) = NF/ us. Since all the clients receive the file in NF/ us, the overall distribution time is also NF/ us. Consider a distribution scheme in which the
server
sends the file to each client, in parallel, at a ra
te
of dmin. No
te
that the aggrega
te
ra
te
, N dmin, is less than the
server
’s link ra
te
us, since by assumption us/N ≥ dmin. Since each client receives at ra
te
dmin, the time for each client to receive the entire file is F/ dmin. Since all the clients receive the file in this time, the overall distribution time is also F/ dmin. From Section 2.6 we know that DCS ≥ max {NF/us, F/dmin} (Equation 1) Suppose that us/N ≤ dmin. Then from Equation 1 we have DCS ≥ NF/us . But from (a) we have DCS ≤ NF/us . Combining these two gives: DCS = NF/us when us/N ≤ dmin. (Equation 2) We can similarly show that: DCS =F/dmin when us/N ≥ dmin (Equation 3). Combining Equation 2 and Equation 3 gives the desired result. Problem 24 Define u = u1 + u2 + ….. + uN. By assumption us <= (us + u)/N Equation 1 Divide the file into N parts, with the ith part having size (ui/u)F. The
server
transmits the ith part to peer i at ra
te
ri = (ui/u)us. No
te
that r1 + r2 + ….. + rN = us, so that the aggrega
te
server
ra
te
does not exceed the link ra
te
of the
server
. Also have each peer i forward the bits it receives to each of the N-1 peers at ra
te
ri. The aggrega
te
forwarding ra
te
by peer i is (N-1)ri. We have (N-1)ri = (N-1)(usui)/u = (us + u)/N Equation 2 Let ri = ui/(N-1) and rN+1 = (us – u/(N-1))/N In this distribution scheme, the file is broken into N+1 parts. The
server
sends bits from the ith part to the ith peer (i = 1, …., N) at ra
te
ri. Each peer i forwards the bits arriving at ra
te
ri to each of the other N-1 peers. Additionally, the
server
sends bits from the (N+1) st part at ra
te
rN+1 to each of the N peers. The peers do not forward the bits from the (N+1)st part. The aggrega
te
send ra
te
of the
server
is r1+ …. + rN + N rN+1 = u/(N-1) + us – u/(N-1) = us Thus, the
server
’s send ra
te
does not exceed its link ra
te
. The aggrega
te
send ra
te
of peer i is (N-1)ri = ui Thus, each peer’s send ra
te
does not exceed its link ra
te
. In this distribution scheme, peer i receives bits at an aggrega
te
ra
te
of Thus each peer receives the file in NF/(us+u). (For simplicity, we neglec
te
d
to specify the size of the file part for i = 1, …., N+1. We now provide that here. Let Δ = (us+u)/N be the distribution time. For i = 1, …, N, the ith file part is Fi = ri Δ bits. The (N+1)st file part is FN+1 = rN+1 Δ bits. It is straightforward to show that F1+ ….. + FN+1 = F.) The solution to this part is similar to that of 17 (c). We know from section 2.6 that Combining this with a) and b) gives the desired result. Problem 25 There are N
node
s in the overlay network. There are N(N-1)/2 edges. Problem 26 Yes. His first claim is possible, as long as there are enough peers staying in the swarm for a long enough time. Bob can always receive data through optimistic unchoking by other peers. His second claim is also true. He can run a client on each host, let each client “free-ride,” and combine the collec
te
d
chunks from the different hosts into a single file. He can even wri
te
a small scheduling program to make the different hosts ask for different chunks of the file. This is actually a kind of Sybil attack in P2P networks. Problem 27 Peer 3 learns that peer 5 has just left the sys
te
m, so Peer 3 asks its first successor (Peer 4) for the identifier of its immedia
te
successor (peer 8). Peer 3 will then make peer 8 its second successor. Problem 28 Peer 6 would first send peer 15 a message, saying “what will be peer 6’s predecessor and successor?” This message gets forwarded through the DHT until it reaches peer 5, who realizes that it will be 6’s predecessor and that its current successor, peer 8, will become 6’s successor. Next, peer 5 sends this predecessor and successor information back to 6. Peer 6 can now join the DHT by making peer 8 its successor and by notifying peer 5 that it should change its immedia
te
successor to 6. Problem 29 For each key, we first calcula
te
the distances (using d(k,p)) between itself and all peers, and then store the key in the peer that is closest to the key (that is, with smallest distance value). Problem 30 Yes, randomly assigning keys to peers does not consider the underlying network at all, so it very likely causes mismatches. Such mismatches may degrade the search performance. For example, consider a logical path p1 (consisting of only two logical links): ABC, where A and B are neighboring peers, and B and C are neighboring peers. Suppose that there is another logical path p2 from A to C (consisting of 3 logical links): ADEC. It might be the case that A and B are very far away physically (and separa
te
d
by many rou
te
rs), and B and C are very far away physically (and separa
te
d
by many rou
te
rs). But it may be the case that A, D, E, and C are all very close physically (and all separa
te
d
by few rou
te
rs). In other words, a shor
te
r logical path may correspond to a much longer physical path. Problem 31 If you run TCPClient first, then the client will at
te
mpt to make a TCP connection with a non-exis
te
nt
server
process. A TCP connection will not be made. UDPClient doesn't establish a TCP connection with the
server
. Thus, everything should work fine if you first run UDPClient, then run UDP
Server
, and then type some input into the keyboard. If you use different port numbers, then the client will at
te
mpt to establish a TCP connection with the wrong process or a non-exis
te
nt process. Errors will occur. Problem 32 In the original program, UDPClient does not specify a port number when it crea
te
s the socket. In this case, the code lets the underlying operating sys
te
m choose a port number. With the additional line, when UDPClient is execu
te
d
, a UDP socket is crea
te
d
with port number 5432 . UDP
Server
needs to know the client port number so that it can send packets back to the correct client socket. Glancing at UDP
Server
, we see that the client port number is not “hard-wired” into the
server
code; ins
te
ad, UDP
Server
de
te
rmines the client port number by unraveling the datagram it receives from the client. Thus UDP
server
will work with any client port number, including 5432. UDP
Server
therefore does not need to be modified. Before: Client socket = x (chosen by OS)
Server
socket = 9876 Af
te
r: Client socket = 5432 Problem 33 Yes, you can configure many browsers to open multiple simultaneous connections to a
Web
si
te
. The advantage is that you will you po
te
ntially download the file fas
te
r. The disadvantage is that you may be hogging the bandwidth, thereby significantly slowing down the downloads of other users who are sharing the same physical links. Problem 34 For an
app
lication such as remo
te
login (
te
lnet and ssh), a by
te
-stream orien
te
d
protocol is very natural since there is no notion of message boundaries in the
app
lication. When a user types a charac
te
r, we simply d
rop
the charac
te
r into the TCP connection. In other
app
lications, we may be sending a series of messages that have inherent boundaries between them. For example, when one SMTP mail
server
sends another SMTP mail
server
several email messages back to back. Since TCP does not have a mechanism to indica
te
the boundaries, the
app
lication must add the indications itself, so that receiving side of the
app
lication can distinguish one message from the next. If each message were ins
te
ad put into a distinct UDP segment, the receiving end would be able to distinguish the various messages without any indications added by the sending side of the
app
lication. Problem 35 To crea
te
a
web
server
, we need to run
web
server
software on a host. Many vendors sell
web
server
software. However, the most popular
web
server
software today is Apache, which is open source and free. Over the years it has been highly optimized by the open-source community. Problem 36 The key is the infohash, the value is an IP address that currently has the file designa
te
d
by the infohash. Chap
te
r 3 Re
view
Questions Call this protocol Simple Transport Protocol (STP). At the sender side, STP accepts from the sending process a chunk of data not exceeding 1196 by
te
s, a destination host address, and a destination port number. STP adds a four-by
te
header to each chunk and puts the port number of the destination process in this header. STP then gives the destination host address and the resulting segment to the network layer. The network layer delivers the segment to STP at the destination host. STP then examines the port number in the segment, extracts the data from the segment, and passes the data to the process identified by the port number. The segment now has two header fields: a source port field and destination port field. At the sender side, STP accepts a chunk of data not exceeding 1192 by
te
s, a destination host address, a source port number, and a destination port number. STP crea
te
s a segment which contains the
app
lication data, source port number, and destination port number. It then gives the segment and the destination host address to the network layer. Af
te
r receiving the segment, STP at the receiving host gives the
app
lication process the
app
lication data and the source port number. No, the transport layer does not have to do anything in the core; the transport layer “lives” in the end sys
te
ms. For sending a let
te
r, the family member is required to give the delega
te
the let
te
r itself, the address of the destination house, and the name of the recipient. The delega
te
clearly wri
te
s the recipient’s name on the top of the let
te
r. The delega
te
then puts the let
te
r in an envelope and wri
te
s the address of the destination house on the envelope. The delega
te
then gives the let
te
r to the planet’s mail service. At the receiving side, the delega
te
receives the let
te
r from the mail service, takes the let
te
r out of the envelope, and takes no
te
of the recipient name writ
te
n at the top of the let
te
r. The delega
te
then gives the let
te
r to the family member with this name. No, the mail service does not have to open the envelope; it only examines the address on the envelope. Source port number y and destination port number x. An
app
lication developer may not want its
app
lication to use TCP’s congestion control, which can throttle the
app
lication’s sending ra
te
at times of congestion. Of
te
n, designers of IP
te
lephony and IP videoconference
app
lications choose to run their
app
lications over UDP because they want to avoid TCP’s congestion control. Also, some
app
lications do not need the reliable data transfer provided by TCP. Since most firewalls are configured to block UDP traffic, using TCP for video and voice traffic lets the traffic though the firewalls. Yes. The
app
lication developer can put reliable data transfer into the
app
lication layer protocol. This would require a significant amount of work and debugging, however. Yes, both segments will be direc
te
d
to the same socket. For each received segment, at the socket in
te
rface, the operating sys
te
m will provide the process with the IP addresses to de
te
rmine the origins of the individual segments. For each persis
te
nt connection, the
Web
server
crea
te
s a separa
te
“connection socket”. Each connection socket is identified with a four-tuple: (source IP address, source port number, destination IP address, destination port number). When host C receives and IP datagram, it examines these four fields in the datagram/segment to de
te
rmine to which socket it should pass the payload of the TCP segment. Thus, the requests from A and B pass through different sockets. The identifier for both of these sockets has 80 for the destination port; however, the identifiers for these sockets have different values for source IP addresses. Unlike UDP, when the transport layer passes a TCP segment’s payload to the
app
lication process, it does not specify the source IP address, as this is implicitly specified by the socket identifier. Sequence numbers are required for a receiver to find out whether an arriving packet contains new data or is a retransmission. To handle losses in the channel. If the ACK for a transmit
te
d
packet is not received within the duration of the timer for the packet, the packet (or its ACK or NACK) is assumed to have been lost. Hence, the packet is retransmit
te
d
. A timer would still be necessary in the protocol rdt 3.0. If the round trip time is known then the only advantage will be that, the sender knows for sure that either the packet or the ACK (or NACK) for the packet has been lost, as compared to the real scenario, where the ACK (or NACK) might still be on the way to the sender, af
te
r the timer expires. However, to de
te
ct the loss, for each packet, a timer of constant duration will still be necessary at the sender. The packet loss caused a time out af
te
r which all the five packets were retransmit
te
d
. Loss of an ACK didn’t trigger any retransmission as Go-Back-N uses cumulative acknowledgements. The sender was unable to send sixth packet as the send window size is fixed to 5. When the packet was lost, the received four packets were buffered the receiver. Af
te
r the timeout, sender retransmit
te
d
the lost packet and receiver delivered the buffered packets to
app
lication in correct order. Duplica
te
ACK was sent by the receiver for the lost ACK. The sender was unable to send sixth packet as the send win
解决Jbuilder里:No
app
rop
ria
te
node
to show
Web
View
for "/
Te
st",... 问题
今天用JBuilder调试一个小程序,导入已有的
web
应用,但启动Tomcat时报错: No
app
rop
ria
te
node
to show
Web
View
for "/
Te
st", but the
web
server
has been s
tar
te
d
鼓捣了一阵,找到解决办法: 1、在Project视图上的
Web
Module节点上右键, 2、然后在弹出菜单选择“属性...
Using PL/SQL APIs as
Web
Services
Over
view
Oracle E-Business Sui
te
In
te
gra
te
d
SOA Ga
te
way allows you to use PL/SQL
app
lication programming in
te
rfaces (APIs) to insert or upda
te
data in Oracle E-Business Sui
te
. APIs are sto...
Eucalyptus弹性计算云平台配置文件和xen配置文件(centos)
view
plaincopy to clipboardprint?# # Eucalyptus configuration. #### # These are to instruct the init.d script on what to s
tar
t. #### # This va
ria
ble points to where eucalyptus has been inst
Node
JS
Web
开发第五版(一)
在本章中,您学到了很多东西。特别是,您看到了 JavaScript 在
Web
浏览器之外的生活,以及
Node
.js 是一个具有许多有趣特性的优秀编程平台。虽然它是一个相对年轻的项目,但
Node
.js 已经变得非常流行,不仅广泛用于
Web
应用程序,还用于命令行开发工具等。由于
Node
.js 平台基于 Chrome 的 V8 JavaScript 引擎,该项目已经能够跟上 JavaScript 语言的快速改进。
Web 开发
81,122
社区成员
341,744
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章