社区
系统维护与使用区
帖子详情
ssh 登录出现:ssh_exchange_identification: Connection closed by remote host
barrett
2003-08-18 06:11:41
操作如下所示:
[root@myhost root]# ssh root@61.124.113.152
ssh_exchange_identification: Connection closed by remote host
前两天还好好的?请大家帮忙分析原因?
...全文
3162
7
打赏
收藏
ssh 登录出现:ssh_exchange_identification: Connection closed by remote host
操作如下所示: [root@myhost root]# ssh root@61.124.113.152 ssh_exchange_identification: Connection closed by remote host 前两天还好好的?请大家帮忙分析原因?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
7 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
acool555
2003-08-24
打赏
举报
回复
看看是不是iptables防火墙安全等级设得高了。
pandeng711
2003-08-19
打赏
举报
回复
也有可能是那台机器禁止你的ip访问
pandeng711
2003-08-19
打赏
举报
回复
是不是那台机器禁止root用户登录?
barrett
2003-08-19
打赏
举报
回复
肯定开了,我用hscan命令打描了那台机器
E:\>hscan -p -t 61.124.113.152
============= HUC Commond line PortScanner V0.1 =============
======== By Lion, Welcome to http://www.cnhonker.net ========
61.124.113.152 Port: 22 open.
61.124.113.152 Port: 80 open.
= / =
Wait (26)Thread end...
= / =
Scan 1 Hosts completed.
Find 2 ports!
真是很奇怪啊!
caiyi0903
2003-08-19
打赏
举报
回复
关注,帮你顶!
rlei
2003-08-19
打赏
举报
回复
up
ayiiq180
2003-08-18
打赏
举报
回复
你登录的机器开没有开sshd服务?去看看吧
计算机网络第六版答案
Computer Networking: A Top-Down Approach, 6th Edit
ion
Solut
ion
s to Review Quest
ion
s and Problems Vers
ion
Date: May 2012 This document contains the solut
ion
s to review quest
ion
s and problems for the 5th edit
ion
of Computer Networking: A Top-Down Approach by Jim Kurose and Keith Ross. These solut
ion
s are being made available to instructors ONLY. Please do NOT copy or distribute this document to others (even other instructors). Please do not post any solut
ion
s on a publicly-available Web site. We’ll be happy to prov
ide
a copy (up-to-date) of this solut
ion
manual ourselves to anyone who asks. Acknowledgments: Over the years, several students and colleagues have helped us prepare this solut
ion
s manual. Special thanks goes to HongGang Zhang, Rakesh Kumar, Prithula Dhungel, and Vijay Annapureddy. Also thanks to all the readers who have made suggest
ion
s and corrected errors. All material © copyright 1996-2012 by J.F. Kurose and K.W. Ross. All rights reserved Chapter 1 Review Quest
ion
s There is no difference. Throughout this t
ex
t, the words “
host
” and “end system” are u
sed
inter
change
ably. End systems include PCs, workstat
ion
s, Web servers, mail servers, PDAs, Internet-connected game consoles, etc. From Wikipedia: Diplomatic protocol is commonly described as a set of internat
ion
al courtesy rules. These well-established and time-honored rules have made it easier for nat
ion
s 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 ba
sed
on the principles of civility. Standards are important for protocols so that people can create networking systems and products that interoperate. 1. Dial-up modem over telephone line: home; 2. DSL over telephone line: home or small office; 3. Cable to HFC: home; 4. 100 Mbps switched Ethernet: enterprise; 5. Wifi (802.11): home and enterprise: 6. 3G and 4G: w
ide
-area wireless. HFC bandwidth is shared among the users. On the downstream channel, all packets emanate from a single source, namely, the head end. Thus, there are no collis
ion
s 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 transmiss
ion
rates of 10 Mbps, 100 Mbps, 1 Gbps and 10 Gbps. 8. Today, Ethernet most commonly runs over twisted-pair copper wire. It also can run over fibers optic links. 9. Dial up modems: up to 56 Kbps, bandwidth is dedi
cat
ed; ADSL: up to 24 Mbps downstream and 2.5 Mbps upstream, bandwidth is dedi
cat
ed; HFC, rates up to 42.8 Mbps and upstream rates 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 Internet access technologies today: Wifi (802.11) In a wireless LAN, wireless users transmit/receive packets to/from an base stat
ion
(i.e., wireless access point) within a radius of few tens of meters. The base stat
ion
is typically connected to the wired Internet and thus serves to connect wireless users to the wired network. 3G and 4G w
ide
-area wireless access networks. In these systems, packets are transmitted over the same wireless infrastructure u
sed
for cellular telephony, with the base stat
ion
thus being managed by a telecommuni
cat
ion
s prov
ide
r. This prov
ide
s wireless access to users within a radius of tens of kilometers of the base stat
ion
. 11. At time t0 the sending
host
begins to transmit. At time t1 = L/R1, the sending
host
completes transmiss
ion
and the entire packet is received at the router (no propagat
ion
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 transmiss
ion
and the entire packet is received at the receiving
host
(again, no propagat
ion
delay). Thus, the end-to-end delay is L/R1 + L/R2. 12. A circuit-switched network can guarantee a certain amount of end-to-end bandwidth for the durat
ion
of a call. Most packet-switched networks today (including the Internet) cannot make any end-to-end guarantees for bandwidth. FDM requires sophisti
cat
ed analog hardware to shift signal into appropriate frequency bands. 13. a) 2 users can be supported 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 fract
ion
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 prov
ide
r ISP (intermediary), 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 prov
ide
r ISPs. An Internet
Ex
change
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 private network connects together all its data centers, big and small. Traffic between the Google data centers passes over its private network rather than over the public Internet. Many of these data centers are lo
cat
ed in, or
clo
se to, lower tier ISPs. Therefore, when Google delivers content to a user, it often can bypass higher tier ISPs. What motivates content prov
ide
rs to create these networks? First, the content prov
ide
r has more control over the user
ex
perience, since it has to use few intermediary ISPs. Second, it can save money by sending less traffic into prov
ide
r networks. Third, if ISPs dec
ide
to charge more money to highly profitable content prov
ide
rs (in countries where net neutrality doesn't apply), the content prov
ide
rs can avoid these
ex
tra payments. 16. The delay components are processing delays, transmiss
ion
delays, propagat
ion
delays, and queuing delays. All of these delays are fixed,
ex
cept for the queuing delays, which are variable. 17. a) 1000 km, 1 Mbps, 100 bytes b) 100 km, 1 Mbps, 100 bytes 18. 10msec; d/s; no; no 19. a) 500 kbps b) 64 seconds c) 100kbps; 320 seconds 20. End system 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 destinat
ion
(end system B). The packet switch uses the destinat
ion
IP address in the packet to determine 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 destinat
ion
address. 21. The maximum emiss
ion
rate is 500 packets/sec and the maximum transmiss
ion
rate is 350 packets/sec. The corresponding traffic intensity is 500/350 =1.43 > 1. Loss will eventually occur for each
ex
periment; but the time when loss first occurs will be different from one
ex
periment to the n
ex
t due to the randomness in the emiss
ion
process. 22. Five generic tasks are error control, flow control, segmentat
ion
and reassembly, multipl
ex
ing, and
connect
ion
setup. Yes, these tasks can be dupli
cat
ed at different layers. For
ex
ample, error control is often prov
ide
d at more than one layer. 23. The five layers in the Internet protocol stack are – from top to bottom – the appli
cat
ion
layer, the transport layer, the network layer, the link layer, and the physical layer. The principal responsibilities are outlined in Sect
ion
1.5.1. 24. Appli
cat
ion
-layer message: data which an appli
cat
ion
wants to send and pas
sed
onto the transport layer; transport-layer segment: generated by the transport layer and encapsulates appli
cat
ion
-layer message with transport layer header; network-layer datagram: encapsulates transport-layer segment with a network-layer header; link-layer frame: encapsulates network-layer datagram with a link-layer header. 25. Routers process network, link and physical layers (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 Transport layer as well.) Link layer switches process link and physical layers (layers 1 through2).
Host
s process all five layers. 26. a) Virus Requires some form of human interact
ion
to spread. Classic
ex
ample: E-mail viruses. b) Worms No user repli
cat
ion
needed. Worm in infected
host
scans IP addresses and port numbers, looking for vulnerable processes to infect. 27. Creat
ion
of a botnet requires an attacker to find vulnerability in some appli
cat
ion
or system (e.g.
ex
ploiting the buffer overflow vulnerability that might
ex
ist in an appli
cat
ion
). After finding the vulnerability, the attacker needs to scan for
host
s that are vulnerable. The target is basically to compromise a series of systems by
ex
ploiting that particular vulnerability. Any system that is part of the botnet can automatically scan its environment and propagate by
ex
ploiting the vulnerability. An important property of such botnets is that the originator of the botnet can
remote
ly control and issue commands to all the nodes in the botnet. Hence, it becomes possible for the attacker to issue a command to all the nodes, that target a single node (for
ex
ample, all nodes in the botnet might be commanded by the attacker to send a TCP SYN message to the target, which might result in a TCP SYN flood attack at the target). 28. Trudy can pretend to be Bob to Alice (and vice-versa) and partially or completely modify the message(s) being sent from Bob to Alice. For
ex
ample, she can easily
change
the phrase “Alice, I owe you $1000” to “Alice, I owe you $10,000”. Furthermore, Trudy can even drop the packets that are being sent by Bob to Alice (and vise-versa), even if the packets from Bob to Alice are encrypted. Chapter 1 Problems Problem 1 There is no single right answer to this quest
ion
. 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 enters 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 requested operat
ion
(PASSWD, WITHDRAWL) OK ERR last requested operat
ion
(PASSWD, WITHDRAWL) in ERROR AMOUNT sent in response to BALANCE request BYE user done, display welcome screen at ATM Correct operat
ion
: 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 destinat
ion
, the second packet is stored in the last router, the third packet is stored in the n
ex
t-to-last router, etc. At time N*(L/R) + L/R, the second packet has reached the destinat
ion
, the third packet is stored in the last router, 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 destinat
ion
. Problem 3 a) A circuit-switched network would be well suited to the appli
cat
ion
, because the appli
cat
ion
involves long sess
ion
s with predictable smooth bandwidth requirements. Since the transmiss
ion
rate is known and not bursty, bandwidth can be reserved for each appli
cat
ion
sess
ion
without significant waste. In addit
ion
, the overhead costs of setting up and tearing down
connect
ion
s are amortized over the lengthy durat
ion
of a typical appli
cat
ion
sess
ion
. b) In the worst case, all the appli
cat
ion
s simultaneously transmit over one or more network links. However, since each link has sufficient bandwidth to handle the sum of all of the appli
cat
ion
s' data rates, no congest
ion
(very little queuing) will occur. Given such generous link capacities, the network does not need congest
ion
control mechanisms. Problem 4 Between the switch in the upper left and the switch in the upper right we can have 4
connect
ion
s. Similarly we can have four
connect
ion
s between each of the 3 other pairs of adjacent switches. Thus, this network can support up to 16
connect
ion
s. We can 4
connect
ion
s passing through the switch in the upper-right-hand corner and another 4
connect
ion
s passing through the switch in the lower-left-hand corner, giving a total of 8
connect
ion
s. Yes. For the
connect
ion
s between A and C, we route two
connect
ion
s through B and two
connect
ion
s through D. For the
connect
ion
s between B and D, we route two
connect
ion
s through A and two
connect
ion
s through C. In this manner, there are at most 4
connect
ion
s passing through any link. Problem 5 Tollbooths are 75 km apart, and the cars propagate at 100km/hr. A tollbooth services a car at a rate of one car every 12 seconds. a) There are ten cars. It takes 120 seconds, or 2 minutes, for the first tollbooth to service the 10 cars. Each of these cars has a propagat
ion
delay of 45 minutes (travel 75 km) before arriving at the second tollbooth. Thus, all the cars are lined up before the second tollbooth after 47 minutes. The whole process repeats itself for traveling between the second and third tollbooths. It also takes 2 minutes for the third tollbooth to service the 10 cars. Thus the total delay is 96 minutes. b) Delay between tollbooths is 8*12 seconds plus 45 minutes, i.e., 46 minutes and 36 seconds. The total delay is twice this amount plus 8*12 seconds, i.e., 94 minutes 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 Cons
ide
r the first bit in a packet. Before this bit can be transmitted, all of the bits in the packet must be generated. This requires sec=7msec. The time required to transmit the packet is sec= sec. Propagat
ion
delay = 10 msec. The delay until decoding is 7msec + sec + 10msec = 17.224msec A similar analysis shows that all bits
ex
perience a delay of 17.224 msec. Problem 8 a) 20 users can be supported. b) . c) . d) . We use the central limit theorem to approximate this probability. Let be independent random variables 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 system requires L/R1 to transmit the packet onto the first link; the packet propagates over the first link in d1/s1; the packet switch adds a processing delay of dproc; after 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 propagates over the second link in d2/s2. Similarly, we can find the delay cau
sed
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 quest
ion
, we simply plug the values into the equat
ion
to get 6 + 6 + 6 + 20+16 + 4 + 3 + 3 = 64 msec. Problem 11 Because bits are immediately transmitted, the packet switch does not introduce any delay; in particular, it does not introduce a transmiss
ion
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 bytes = 6,750 bytes or 54,000 bits. Since these bits are transmitted 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 transmitted packet, L/R for the second transmitted packet, and generally, (n-1)L/R for the nth transmitted 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) Note that here we u
sed
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 transmiss
ion
delay is . The total delay is Let . Total delay = For x=0, the total delay =0; as we increase x, total delay increases, approaching infinity as x approaches 1/a. Problem 15 Total delay . Problem 16 The total number of packets in the system includes those in the buffer and the packet that is being transmitted. So, N=10+1. Because , so (10+1)=a*(queuing delay + transmiss
ion
delay). That is, 11=a*(0.01+1/100)=a*(0.01+0.01). Thus, a=550 packets/sec. Problem 17 There are nodes (the source
host
and the routers). Let denote the processing delay at the th node. Let be the transmiss
ion
rate of the th link and let . Let be the propagat
ion
delay across the th link. Then . Let denote the average queuing delay at node . Then . Problem 18 On linux you can use the command traceroute www.target
host
.com and in the Windows command prompt you can use tracert www.target
host
.com In either case, you will get three delay measurements. For those three measurements you can calculate the mean and standard deviat
ion
. Repeat the
ex
periment at different times of the day and comment on any
change
s. Here is an
ex
ample solut
ion
: Traceroutes between San Diego Super Computer Center 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 deviat
ion
s are 0.075 ms, 0.21 ms, 0.05 ms, respectively. In this
ex
ample, the traceroutes have 12 routers in the path at each of the three hours. No, the paths didn’t
change
during any of the hours. Traceroute packets pas
sed
through four ISP networks from source to destinat
ion
. Yes, in this
ex
periment the largest delays occurred at peering interfaces between adjacent ISPs. Traceroutes from www.stella-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 deviat
ion
s are 0.53 ms, 0.18 ms, 0.23 ms, respectively. In this
ex
ample, there are 11 routers in the path at each of the three hours. No, the paths didn’t
change
during any of the hours. Traceroute packets pas
sed
three ISP networks from source to destinat
ion
. Yes, in this
ex
periment the largest delays occurred at peering interfaces between adjacent ISPs. Problem 19 An
ex
ample solut
ion
: Traceroutes from two different cities in France to New York City in United States In these traceroutes from two different cities in France to the same destinat
ion
host
in United States, seven links are in common including the transatlantic link. In this
ex
ample of traceroutes from one city in France and from another city in Germany to the same
host
in United States, three links are in common including the transatlantic link. Traceroutes to two different cities in China from same
host
in United States Five links are common in the two traceroutes. The two traceroutes 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 transmiss
ion
s needed to be performed until the packet is successfully received by the client is a geometric random variable with success probability ps. Thus, the average number of transmiss
ion
s needed is given by: 1/ps . Then, the average number of re-transmiss
ion
s 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 transmiss
ion
of packet A. So the packet inter-arrival time at the destinat
ion
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 transmiss
ion
of the first packet. That is, L/Rs + L/Rs + dprop = L/Rs + dprop + L/Rc Thus, the minimum value of T is L/Rc L/Rs . Problem 24 40 terabytes = 40 * 1012 * 8 bits. So, if using the dedi
cat
ed link, it will take 40 * 1012 * 8 / (100 *106 ) =3200000 seconds = 37 days. But with Fed
Ex
overnight delivery, you can guarantee 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 meters 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 meters Problem 28 ttrans + tprop = 400 msec + 80 msec = 480 msec. 20 * (ttrans + 2 tprop) = 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 propagat
ion
delays. Problem 29 Recall geostat
ion
ary satellite is 36,000 kilometers 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 addit
ion
al informat
ion
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 s
ide
, and then reuniting them (hopefully!) on the destinat
ion
s
ide
. When a passenger then passes through security and addit
ion
al stamp is often added to his/her ticket, indi
cat
ing that the passenger has pas
sed
through a security check. This informat
ion
is u
sed
to ensure (e.g., by later checks for the security informat
ion
) 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 destinat
ion
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 destinat
ion
host
= . After 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 segmentat
ion
is significantly less (almost 1/3rd). Without message segmentat
ion
, if bit errors are not tolerated, if there is a single bit error, the whole message has to be retransmitted (rather than a single packet). Without message segmentat
ion
, huge packets (containing HD v
ide
os, for
ex
ample) are sent into the network. Routers have to accommodate these huge packets. Smaller packets have to queue behind enormous packets and suffer unfair delays. Packets have to be put in sequence at the destinat
ion
. Message segmentat
ion
results in many smaller packets. Since header size is usually the same for all packets regardless of their size, with message segmentat
ion
the total amount of header bytes is more. Problem 32 Yes, the delays in the applet correspond to the delays in the Problem 31.The propagat
ion
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 router is sec. At this time, the first F/S-2 packets are at the destinat
ion
, and the F/S-1 packet is at the second router. The last packet must then be transmitted by the first router and the second router, with each transmiss
ion
taking sec. Thus delay in sending the whole file is To calculate the value of S which leads to the minimum delay, Problem 34 The circuit-switched telephone networks and the Internet are connected together at "gateways". When a Skype user (connected to the Internet) calls an ordinary telephone, a circuit is established between a gateway and the telephone user over the circuit switched network. The skype user's voice is sent in packets over the Internet to the gateway. At the gateway, the voice signal is reconstructed and then sent over the circuit. In the other direct
ion
, the voice signal is sent over the circuit switched network to the gateway. The gateway packetizes the voice signal and sends the voice packets to the Skype user. Chapter 2 Review Quest
ion
s The Web: HTTP; file transfer: FTP;
remote
login: Telnet; e-mail: SMTP; BitTorrent file sharing: BitTorrent protocol Network architecture refers to the organizat
ion
of the communi
cat
ion
process into layers (e.g., the five-layer Internet architecture). Appli
cat
ion
architecture, on the other hand, is designed by an appli
cat
ion
developer and dictates the broad structure of the appli
cat
ion
(e.g., client-server or P2P). The process which initiates the communi
cat
ion
is the client; the process that waits to be contacted is the server. No. In a P2P file-sharing appli
cat
ion
, 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 destinat
ion
host
and the port number of the socket in the destinat
ion
process. You would use UDP. With UDP, the transact
ion
can be completed in one roundtrip time (RTT) - the client sends the transact
ion
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
connect
ion
, and another for the client to send the request, and for the server to send back the reply. One such
ex
ample is
remote
word processing, for
ex
ample, with Google docs. However, because Google docs runs over the Internet (using TCP), timing guarantees are not prov
ide
d. a) Reliable data transfer TCP prov
ide
s a reliable byte-stream between client and server but UDP does not. b) A guarantee that a certain value for throughput will be maintained Neither c) A guarantee that data will be delivered within a specified amount of time Neither d) Conf
ide
ntiality (via encrypt
ion
) Neither SSL operates at the appli
cat
ion
layer. The SSL socket takes unencrypted data from the appli
cat
ion
layer, encrypts it and then passes it to the TCP socket. If the appli
cat
ion
developer wants TCP to be enhanced with SSL, she has to include the SSL code in the appli
cat
ion
. A protocol uses handshaking if the two communi
cat
ing entities first
ex
change
control packets before sending data to each other. SMTP uses handshaking at the appli
cat
ion
layer whereas HTTP does not. The appli
cat
ion
s associated with those protocols require that all appli
cat
ion
data be received in the correct order and without gaps. TCP prov
ide
s this service whereas UDP does not. When the user first visits the site, the server creates a unique
ide
ntifi
cat
ion
number, creates an entry in its back-end database, and returns this
ide
ntifi
cat
ion
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 site. Thus the site knows when this user (more precisely, this browser) is visiting the site. Web caching can bring the desired content “
clo
ser” to the user, possibly to the same LAN to which the user’s
host
is connected. Web caching can reduce the delay for all objects, even objects that are not cached, since caching reduces the traffic on links. Telnet 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 Telnet client. To start Telnet, in Windows command prompt, issue the following command > telnet webserverver 80 where "webserver" is some webserver. After issuing the command, you have established a TCP
connect
ion
between your client telnet program and the web server. Then type in an HTTP GET message. An
ex
ample is given below: Since the ind
ex
.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". Note that the first 4 lines are the GET message and header lines inputed by the user, and the n
ex
t 4 lines (starting from HTTP/1.1 304 Not Modified) is the response from the web server. FTP uses two parallel TCP
connect
ion
s, one
connect
ion
for sending control informat
ion
(such as a request to transfer a file) and another
connect
ion
for actually transferring the file. Because the control informat
ion
is not sent over the same
connect
ion
that the file is sent over, FTP sends control informat
ion
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: Test mail Date: Sat, 19 May 2007 23:52:36 +0000 Mime-Vers
ion
: 1.0 Content-Type: T
ex
t/html; format=flowed Return-Path: prithuladhungel@hotmail.com Figure: A sample mail message header Received: This header field indi
cat
es the sequence in which the SMTP servers send and receive the mail message including the respective timestamps. In this
ex
ample there are 4 “Received:” header lines. This means the mail message pas
sed
through 5 different SMTP servers before being delivered to the receiver’s mail box. The last (forth) “Received:” header indi
cat
es the mail message flow from the SMTP server of the sender to the second SMTP server in the chain of servers. 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 indi
cat
es the mail message flow from the second SMTP server in the chain to the third server, and so on. Finally, the first “Received:” header indi
cat
es 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 system when the message is first created. From: This indi
cat
es the email address of the sender of the mail. In the given
ex
ample, the sender is “prithuladhungel@hotmail.com” To: This field indi
cat
es the email address of the receiver of the mail. In the
ex
ample, the receiver is “prithula@yahoo.com” Subject: This gives the subject of the mail (if any specified by the sender). In the
ex
ample, the subject specified by the sender is “Test mail” Date: The date and time when the mail was sent by the sender. In the
ex
ample, the sender sent the mail on 19th May 2007, at time 23:52:36 GMT. Mime-vers
ion
: MIME vers
ion
u
sed
for the mail. In the
ex
ample, it is 1.0. Content-type: The type of content in the body of the mail message. In the
ex
ample, it is “t
ex
t/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 u
sed
by the sender’s mail server for bouncing back undeliverable mail messages of mailer-daemon error messages. In the
ex
ample, the return path is “prithuladhungel@hotmail.com”. With download and delete, after a user retrieves its messages from a POP server, the messages are deleted. 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 configurat
ion
, messages are not deleted after 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-deleted messages will be transferred to the new machine (including very old messages). Yes an organizat
ion
’s mail server and Web server can have the same alias for a
host
name. The MX record is u
sed
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 prov
ide
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 prov
ide
s chunks to Bob throughout a 30-second interval. 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 system consists of the nodes participating in the file sharing system and the logical links between the nodes. There is a logical link (an “edge” in graph theory terms) from node A to node B if there is a semi-permanent TCP
connect
ion
between A and B. An overlay network does not include routers. Mesh DHT: The advantage is in order to a route a message to the peer (with ID) that is
clo
sest 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 route a message to the peer that is
clo
sest to the key. 25. File Distribut
ion
Instant Messaging V
ide
o Streaming Distributed Computing With the UDP server, there is no welcoming socket, and all data from different clients enters the server through this one socket. With the TCP server, there is a welcoming socket, and each time a client initiates a
connect
ion
to the server, a new socket is created. Thus, to support n simultaneous
connect
ion
s, the server would need n+1 sockets. For the TCP appli
cat
ion
, as soon as the client is
ex
ecuted, it attempts to initiate a TCP
connect
ion
with the server. If the TCP server is not running, then the client will fail to make a
connect
ion
. For the UDP appli
cat
ion
, the client does not initiate
connect
ion
s (or attempt to communi
cat
e with the UDP server) immediately upon
ex
ecut
ion
Chapter 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 parameter commands: PORT, PASV, TYPE STRU, MODE. Service commands: RETR, STOR, STOU, APPE, ALLO, REST, RNFR, RNTO, ABOR, DELE, RMD, MRD, PWD, LIST, NLST, SITE, SYST, STAT, HELP, NOOP. Problem 3 Appli
cat
ion
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/ind
ex
.html. The
Host
: field indi
cat
es the server's name and /cs453/ind
ex
.html indi
cat
es the file name. The browser is running HTTP vers
ion
1.1, as indi
cat
ed just before the first pair. The browser is requesting a persistent
connect
ion
, as indi
cat
ed by the
Connect
ion
: keep-alive. This is a trick quest
ion
. This informat
ion
is not contained in an HTTP message anywhere. So there is no way to tell this from looking at the
ex
change
of HTTP messages alone. One would need informat
ion
from the IP datagrams (that carried the TCP segment that carried the HTTP GET request) to answer this quest
ion
. Mozilla/5.0. The browser type informat
ion
is needed by the server to send different vers
ion
s of the same object to different types of browsers. Problem 5 The status code of 200 and the phrase OK indi
cat
e that the server was able to lo
cat
e the document successfully. The reply was prov
ide
d on Tuesday, 07 Mar 2008 12:39:45 Greenwich Mean Time. The document ind
ex
.html was last modified on Saturday 10 Dec 2005 18:27:46 GMT. There are 3874 bytes in the document being returned. The first five bytes of the returned document are : connect
ion
, as indi
cat
ed by the
Connect
ion
: Keep-Alive field Problem 6 Persistent
connect
ion
s are discus
sed
in sect
ion
8 of RFC 2616 (the real goal of this quest
ion
was to get you to retrieve and read an RFC). Sect
ion
s 8.1.2 and 8.1.2.1 of the RFC indi
cat
e that either the client or the server can indi
cat
e to the other that it is going to
clo
se the persistent
connect
ion
. It does so by including the
connect
ion
-token "
clo
se" in the
Connect
ion
-header field of the http request/reply. HTTP does not prov
ide
any encrypt
ion
services. (From RFC 2616) “Clients that use persistent
connect
ion
s should limit the number of simultaneous
connect
ion
s that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2
connect
ion
s with any server or proxy.” Yes. (From RFC 2616) “A client might have started to send a new request at the same time that the server has dec
ide
d to
clo
se the "idle"
connect
ion
. From the server's point of view, the
connect
ion
is being
clo
sed
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
connect
ion
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 rate R is L/R. The average time is the average size of the object div
ide
d by R: = (850,000 bits)/(15,000,000 bits/sec) = .0567 sec The traffic intensity 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 intensity on the access link is reduced by 60% since the 60% of the requests are satisfied within the institut
ion
al network. Thus the average access delay is (.0567 sec)/[1 – (.4)(.907)] = .089 seconds. The response time is approximately zero if the request is satisfied by the cache (which happens with probability .6); the average response time is .089 sec + 3 sec = 3.089 sec for cache misses (which happens 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 Note that each downloaded object can be completely put into one data packet. Let Tp denote the one-way propagat
ion
delay between the client and the server. First cons
ide
r parallel downloads using non-persistent
connect
ion
s. Parallel downloads would allow 10
connect
ion
s 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 cons
ide
r a persistent HTTP
connect
ion
. 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 transmiss
ion
delay. Thus, we see that persistent HTTP is not significantly faster (less than 1 percent) than the non-persistent case with parallel download. Problem 11 Yes, because Bob has more
connect
ion
s, 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 * serverPort=12000 serverSocket=socket(AF_INET,SOCK_STREAM) serverSocket.bind(('',serverPort)) serverSocket.listen(1)
connect
ion
Socket, addr = serverSocket.accept() while 1: sentence =
connect
ion
Socket.recv(1024) print 'From Server:', sentence, '\n' serverSocket.
clo
se() Problem 13 The MAIL FROM: in SMTP is a message from the SMTP client that
ide
ntifi
es 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 “Content-Length header field” to indi
cat
e the length of a message body. No, HTTP cannot use the method u
sed
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 abbreviates “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 sess
ion
s, the client can use the UIDL command to determine 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 u
sed
to lo
cat
e the corresponding registrar, whois server, DNS server, and so on. NS4.YAHOO.COM from www.register.com; NS1.MSFT.NET from ww.register.com Local Domain: www.mindspring.com Web servers : 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 Servers : 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 Servers: itchy.earthlink.net (207.69.188.196) scratchy.earthlink.net (207.69.188.197) www.yahoo.com Web Servers: www.yahoo.com (216.109.112.135, 66.94.234.13) Mail Servers: 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 Servers: 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 Servers: www.hotmail.com (64.4.33.7, 64.4.32.7) Mail Servers: 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 Servers: 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 Polytechnic University: 128.238.0.0 – 128.238.255.255 f) An attacker can use the whois database and nslookup tool to determine the IP address ranges, DNS server addresses, etc., for the target institut
ion
. By analyzing the source address of attack packets, the victim can use whois to obtain informat
ion
about domain from which the attack is coming and possibly inform the administrators of the origin domain. Problem 19 The following delegat
ion
chain is u
sed
for gaia.cs.umass.edu a.root-servers.net E.GTLD-SERVERS.NET ns1.umass.edu(authoritative) First command: dig +norecurse @a.root-servers.net any gaia.cs.umass.edu ;; AUTHORITY SECT
ION
: edu. 172800 IN NS E.GTLD-SERVERS.NET. edu. 172800 IN NS A.GTLD-SERVERS.NET. edu. 172800 IN NS G3.NSTLD.COM. edu. 172800 IN NS D.GTLD-SERVERS.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-SERVERS.NET. Among all returned edu DNS servers, we send a query to the first one. dig +norecurse @E.GTLD-SERVERS.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 servers, 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-servers.net E.GTLD-SERVERS.NET ns1.google.com(authoritative) Problem 20 We can periodically take a snapshot of the DNS caches in the local DNS servers. The Web server that appears most frequently in the DNS caches is the most popular server. This is because if more users are interested in a Web server, then DNS requests for that server are more frequently sent by users. Thus, that Web server will appear in the DNS caches more frequently. For a complete measurement study, see: Craig E. Wills, Mikhail Mikhailov, Hao Shang “Inferring Relative Popularity of Internet Appli
cat
ion
s 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 site in the local DNS server. For
ex
ample, “dig cnn.com” will return the query time for finding cnn.com. If cnn.com was just acces
sed
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 distribut
ion
time for client-server distribut
ion
, we use the following formula: Dcs = max {NF/us, F/dmin} Similarly, for calculating the minimum distribut
ion
time for P2P distribut
ion
, we use the following formula: Where, F = 15 Gbits = 15 * 1024 Mbits us = 30 Mbps dmin = di = 2 Mbps Note, 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 Cons
ide
r a distribut
ion
scheme in which the server sends the file to each client, in parallel, at a rate of a rate of us/N. Note that this rate is less than each of the client’s download rate, since by assumpt
ion
us/N ≤ dmin. Thus each client can also receive at rate us/N. Since each client receives at rate 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 distribut
ion
time is also NF/ us. Cons
ide
r a distribut
ion
scheme in which the server sends the file to each client, in parallel, at a rate of dmin. Note that the aggregate rate, N dmin, is less than the server’s link rate us, since by assumpt
ion
us/N ≥ dmin. Since each client receives at rate 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 distribut
ion
time is also F/ dmin. From Sect
ion
2.6 we know that DCS ≥ max {NF/us, F/dmin} (Equat
ion
1) Suppose that us/N ≤ dmin. Then from Equat
ion
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. (Equat
ion
2) We can similarly show that: DCS =F/dmin when us/N ≥ dmin (Equat
ion
3). Combining Equat
ion
2 and Equat
ion
3 gives the desired result. Problem 24 Define u = u1 + u2 + ….. + uN. By assumpt
ion
us <= (us + u)/N Equat
ion
1 Div
ide
the file into N parts, with the ith part having size (ui/u)F. The server transmits the ith part to peer i at rate ri = (ui/u)us. Note that r1 + r2 + ….. + rN = us, so that the aggregate server rate does not
ex
ceed the link rate of the server. Also have each peer i forward the bits it receives to each of the N-1 peers at rate ri. The aggregate forwarding rate by peer i is (N-1)ri. We have (N-1)ri = (N-1)(usui)/u = (us + u)/N Equat
ion
2 Let ri = ui/(N-1) and rN+1 = (us – u/(N-1))/N In this distribut
ion
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 rate ri. Each peer i forwards the bits arriving at rate ri to each of the other N-1 peers. Addit
ion
ally, the server sends bits from the (N+1) st part at rate rN+1 to each of the N peers. The peers do not forward the bits from the (N+1)st part. The aggregate send rate of the server is r1+ …. + rN + N rN+1 = u/(N-1) + us – u/(N-1) = us Thus, the server’s send rate does not
ex
ceed its link rate. The aggregate send rate of peer i is (N-1)ri = ui Thus, each peer’s send rate does not
ex
ceed its link rate. In this distribut
ion
scheme, peer i receives bits at an aggregate rate of Thus each peer receives the file in NF/(us+u). (For simplicity, we neglected to specify the size of the file part for i = 1, …., N+1. We now prov
ide
that here. Let Δ = (us+u)/N be the distribut
ion
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 solut
ion
to this part is similar to that of 17 (c). We know from sect
ion
2.6 that Combining this with a) and b) gives the desired result. Problem 25 There are N nodes 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-r
ide
,” and combine the collected chunks from the different
host
s into a single file. He can even write a small scheduling program to make the different
host
s 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 system, so Peer 3 asks its first successor (Peer 4) for the
ide
ntifi
er of its immediate 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. N
ex
t, peer 5 sends this predecessor and successor informat
ion
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 immediate successor to 6. Problem 29 For each key, we first calculate the distances (using d(k,p)) between itself and all peers, and then store the key in the peer that is
clo
sest to the key (that is, with smallest distance value). Problem 30 Yes, randomly assigning keys to peers does not cons
ide
r the underlying network at all, so it very likely causes mismatches. Such mismatches may degrade the search performance. For
ex
ample, cons
ide
r 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 separated by many routers), and B and C are very far away physically (and separated by many routers). But it may be the case that A, D, E, and C are all very
clo
se physically (and all separated by few routers). In other words, a shorter logical path may correspond to a much longer physical path. Problem 31 If you run TCPClient first, then the client will attempt to make a TCP
connect
ion
with a non-
ex
istent server process. A TCP
connect
ion
will not be made. UDPClient doesn't establish a TCP
connect
ion
with the server. Thus, everything should work fine if you first run UDPClient, then run UDPServer, and then type some input into the keyboard. If you use different port numbers, then the client will attempt to establish a TCP
connect
ion
with the wrong process or a non-
ex
istent process. Errors will occur. Problem 32 In the original program, UDPClient does not specify a port number when it creates the socket. In this case, the code lets the underlying operating system choose a port number. With the addit
ion
al line, when UDPClient is
ex
ecuted, a UDP socket is created with port number 5432 . UDPServer needs to know the client port number so that it can send packets back to the correct client socket. Glancing at UDPServer, we see that the client port number is not “hard-wired” into the server code; instead, UDPServer determines 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. UDPServer therefore does not need to be modified. Before: Client socket = x (chosen by OS) Server socket = 9876 After: Client socket = 5432 Problem 33 Yes, you can configure many browsers to open multiple simultaneous
connect
ion
s to a Web site. The advantage is that you will you potentially download the file faster. 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 appli
cat
ion
such as
remote
login (telnet and
ssh
), a byte-stream oriented protocol is very natural since there is no not
ion
of message boundaries in the appli
cat
ion
. When a user types a character, we simply drop the character into the TCP
connect
ion
. In other appli
cat
ion
s, we may be sending a series of messages that have inherent boundaries between them. For
ex
ample, when one SMTP mail server sends another SMTP mail server several email messages back to back. Since TCP does not have a mechanism to indi
cat
e the boundaries, the appli
cat
ion
must add the indi
cat
ion
s itself, so that receiving s
ide
of the appli
cat
ion
can distinguish one message from the n
ex
t. If each message were instead put into a distinct UDP segment, the receiving end would be able to distinguish the various messages without any indi
cat
ion
s added by the sending s
ide
of the appli
cat
ion
. Problem 35 To create 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 designated by the infohash. Chapter 3 Review Quest
ion
s Call this protocol Simple Transport Protocol (STP). At the sender s
ide
, STP accepts from the sending process a chunk of data not
ex
ceeding 1196 bytes, a destinat
ion
host
address, and a destinat
ion
port number. STP adds a four-byte header to each chunk and puts the port number of the destinat
ion
process in this header. STP then gives the destinat
ion
host
address and the resulting segment to the network layer. The network layer delivers the segment to STP at the destinat
ion
host
. STP then
ex
amines the port number in the segment,
ex
tracts the data from the segment, and passes the data to the process
ide
ntifi
ed by the port number. The segment now has two header fields: a source port field and destinat
ion
port field. At the sender s
ide
, STP accepts a chunk of data not
ex
ceeding 1192 bytes, a destinat
ion
host
address, a source port number, and a destinat
ion
port number. STP creates a segment which contains the appli
cat
ion
data, source port number, and destinat
ion
port number. It then gives the segment and the destinat
ion
host
address to the network layer. After receiving the segment, STP at the receiving
host
gives the appli
cat
ion
process the appli
cat
ion
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 systems. For sending a letter, the family member is required to give the delegate the letter itself, the address of the destinat
ion
house, and the name of the recipient. The delegate clearly writes the recipient’s name on the top of the letter. The delegate then puts the letter in an envelope and writes the address of the destinat
ion
house on the envelope. The delegate then gives the letter to the planet’s mail service. At the receiving s
ide
, the delegate receives the letter from the mail service, takes the letter out of the envelope, and takes note of the recipient name written at the top of the letter. The delegate then gives the letter to the family member with this name. No, the mail service does not have to open the envelope; it only
ex
amines the address on the envelope. Source port number y and destinat
ion
port number x. An appli
cat
ion
developer may not want its appli
cat
ion
to use TCP’s congest
ion
control, which can throttle the appli
cat
ion
’s sending rate at times of congest
ion
. Often, designers of IP telephony and IP v
ide
oconference appli
cat
ion
s choose to run their appli
cat
ion
s over UDP because they want to avoid TCP’s congest
ion
control. Also, some appli
cat
ion
s do not need the reliable data transfer prov
ide
d by TCP. Since most firewalls are configured to block UDP traffic, using TCP for v
ide
o and voice traffic lets the traffic though the firewalls. Yes. The appli
cat
ion
developer can put reliable data transfer into the appli
cat
ion
layer protocol. This would require a significant amount of work and debugging, however. Yes, both segments will be directed to the same socket. For each received segment, at the socket interface, the operating system will prov
ide
the process with the IP addresses to determine the origins of the individual segments. For each persistent
connect
ion
, the Web server creates a separate “
connect
ion
socket”. Each
connect
ion
socket is
ide
ntifi
ed with a four-tuple: (source IP address, source port number, destinat
ion
IP address, destinat
ion
port number). When
host
C receives and IP datagram, it
ex
amines these four fields in the datagram/segment to determine to which socket it should pass the payload of the TCP segment. Thus, the requests from A and B pass through different sockets. The
ide
ntifi
er for both of these sockets has 80 for the destinat
ion
port; however, the
ide
ntifi
ers for these sockets have different values for source IP addresses. Unlike UDP, when the transport layer passes a TCP segment’s payload to the appli
cat
ion
process, it does not specify the source IP address, as this is implicitly specified by the socket
ide
ntifi
er. Sequence numbers are required for a receiver to find out whether an arriving packet contains new data or is a retransmiss
ion
. To handle losses in the channel. If the ACK for a transmitted packet is not received within the durat
ion
of the timer for the packet, the packet (or its ACK or NACK) is assumed to have been lost. Hence, the packet is retransmitted. 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, after the timer
ex
pires. However, to detect the loss, for each packet, a timer of constant durat
ion
will still be necessary at the sender. The packet loss cau
sed
a time out after which all the five packets were retransmitted. Loss of an ACK didn’t trigger any retransmiss
ion
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. After the timeout, sender retransmitted the lost packet and receiver delivered the buffered packets to appli
cat
ion
in correct order. Dupli
cat
e ACK was sent by the receiver for the lost ACK. The sender was unable to send sixth packet as the send win
解决
ssh
连接远程机器时提示“
ssh
_
ex
change
_
ide
ntifi
cat
ion
:
Connect
ion
clo
sed
by
remote
host
”或
Connect
ion
refu
sed
不少人在
ssh
连接远程机器时遇到过
ssh
_
ex
change
_
ide
ntifi
cat
ion
:
Connect
ion
clo
sed
by
remote
host
的问题,在网上找了一堆教程试了都不行,博主总结了常见的几种解决方法(以Ubuntu18.04为例)。 可能原因1:没装open
ssh
-server;解决方案: sudo apt install open
ssh
-server 或者 sudo apt-get install open
ssh
-server 可能原因2:连接超过了MaxSess
ion
解决win10中
ssh
登录
错误信息:
ssh
_
ex
change
_
ide
ntifi
cat
ion
:
Connect
ion
clo
sed
by
remote
host
1、报错:
ssh
登录
报错 在使用
ssh
登录
时
出现
的错误信息:
ssh
_
ex
change
_
ide
ntifi
cat
ion
:
Connect
ion
clo
sed
by
remote
host
. 2、
出现
此错误的状况: 内网使用
ssh
登录
时报错,此报错不正常,暂时无法分析错误原因,但总结一下错误现象: 本机(win10)测试:内网机器IP ping不同,但部分机器的
ssh
可以正常
登录
,某些机器无法正常
登录
并报上述错误。本机上网正常,IP也在同一段,但并不意味着整个网络就正常。 找一台Linux机器(同样的网络环境
ssh
问题:
ssh
_
ex
change
_
ide
ntifi
cat
ion
:
Connect
ion
clo
sed
by
remote
host
ssh
问题:
ssh
_
ex
change
_
ide
ntifi
cat
ion
:
Connect
ion
clo
sed
by
remote
host
... 刚刚一个朋友告诉我
SSH
连接不上服务器了,重启电脑也不管用.我仔细看了一下,老报如下错误:
ssh
_
ex
change
_
ide
ntifi
cat
ion
:
Connect
ion
clo
sed
by
remote
host
the
connect
ion
t...
ssh
连接
出现
错误: k
ex
_
ex
change
_
ide
ntifi
cat
ion
:
Connect
ion
clo
sed
by
remote
host
当
出现
这种错误的时候,不要慌,我在csdn上面看了其他人描述的花里胡哨,其实一点用没有,实际上你只要初始化一下你本用户的.
ssh
文件夹就可以了。原因可能是我们本地的.
ssh
出现
了问题,或者是
ssh
进行了更新,导致
出现
的问题,实际上我们只要重新生成一下就可以了。执行完这条命令,然后接着执行
ssh
连接主机就可以成功执行了。
系统维护与使用区
19,612
社区成员
74,603
社区内容
发帖
与我相关
我的任务
系统维护与使用区
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
复制链接
扫一扫
分享
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章