signature=5ba68981457692383d5d6649d73135fb,solutions for assignment5

suppose

Chapter 5+6+8 Assignments

P5.Consider the 5-bit generator, G= 10011, and suppose that D has the value 1010101010. What is the value of CRC?

Solution:

If we divide 10011 into 1010101010 0000, we get 1011011100, with a remainder of R=0100.

P21. Suppose nodes A and B are on the same 10Mbps Ethernet bus, and the propagation delay

between the two nodes is 245 bit times. Suppose A and B send frames at the same time, the frames collide, and then A and B choose different values of K in the CSMA/CD algorithm. Assuming no other nodes are active, can the retransmissions from A and B collide? For our purposes, it suffices to work out the following example. Suppose A and B begin transmission at t =0 bit times. They both detect collisions at t =245 bit times. They finish transmitting a jam signal at t = 245 + 48 = 293 bit times. Suppose K A =0 and K B = 1. At what time does B schedule its retransmission? At what time does A begin transmission? (Note: The nodes must wait for an idle channel after returning to Step 2 -- see protocol.) At what time does A's signal reach B? Does B refrain from transmitting at its scheduled time?

Solution:

Because A's retransmission reaches B before B's scheduled retransmission time (805+96), B refrains from transmitting while A retransmits. Thus A and B do

not collide. Thus the factor 512 appearing in the exponential backoff algorithm is sufficiently large.

P23. Suppose four nodes, A, B, C, and D, are all connected to a hub via 10Mbps Ethernet cables.

The distances between the hub and these four nodes are 300m, 400m, 500m, and 700m, respectively. Recall that the CSMNCD protocol is used for this Ethernet. Assume that the signal propagation speed is 2*108m/sec.

a. What is the minimum required frame length?

b. If all frames are 1500 bits long, find the efficiency of this Ethernet.

Solution:

a). minimum required frame length is given by

2*d prop* BW=2*(500+700)/( 2 108) * 10 * 106=120 bits.

There is no maximum required packet length.

b). Efficiency is given by

1/(1+5* d prop/ d trans) =1/(1+5*120/2/1500 )=0.83

P37. In this problem, you will put together much of what you have learned about Internet

protocols. Suppose you walk into a room, connect to Ethernet, and want to download a web page. What are all the protocol steps that take place starting from powering on your PC to getting the web page? Assume there is nothing in our DNS or browser caches when you power on your Pc. (Hint: the steps include the use of Ethernet, OHCP, ARP, ONS, TCP, and HTTP protocols.) Explicitly indicate in your steps how you obtain the IP and MAC addresses of a gateway router.

Solution:(The following description is short, but contains all major key steps and key protocols involved.)

Your computer first uses DHCP to obtain an IP address. You computer first creates a special IP datagram destined to 255.255.255.255 in the DHCP server discovery step, and puts it in a Ethernet frame and broadcast it in the Ethernet. Then following the steps in the DHCP protocol, you computer is able to get an IP address with a given lease time.

A DHCP server on the Ethernet also gives your computer a list of IP addresses of first-hop routers, the subnet mask of the subnet where your computer resides, and the addresses of local DNS servers (if they exist).

Since your computer’s ARP cache is initially empty, your computer will use ARP protocol to get the MAC addresses of the first-hop router and the local DNS server.

Your computer first will get the IP address of the Web page you would like to download. If the local DNS server does not have the IP address, then your computer will use DNS protocol to find the IP address of the Web page.

Once your computer has the IP address of the Web page, then it will send out the HTTP request via the first-hop router if the Web page does not reside in a local Web server. The HTTP request message will be segmented and encapsulated into TCP packets, and then further encapsulated into IP packets, and finally encapsulated into Ethernet frames. Your computer sends the Ethernet frames destined to the first-hop router. Once the router receives the frames, it passes them up into IP layer, checks its routing table, and then sends the packets to the right interface out of all of its interfaces.

Then your IP packets will be routed through the Internet until they reach the Web server.

The server hosting the Web page will send back the Web page to your computer via HTTP response messages. Those messages will be encapsulated into TCP packets and then further into IP packets. Those IP packets follow IP routes and finally reach your first-hop router, and then the router will forward those IP packets to your computer by encapsulating them into Ethernet frames.

Additional 1: Please answer the following question after reading Chapter 6 and referring to

the ftp://public.sjtu.edu.cn/chapt6.pdf . What are MAC methods for WiFi, Bluetooth, WiMax and Cellular network respectively? What are RDT approaches for WiFi, Bluetooth, WiMax and Cellular network respectively? error detection + retransmisstion or error correction?

Solution:The following table summarizes the wireless MAC and RDT technologies. Each needs to be explained in detail.

Additional 2:Why WiFi can’t CSMA/CD?

Solution:Because Collisions Detection is difficult for WiFi:

∙hidden terminal problem 。

∙difficult to sense because of fading

∙Most radios are half duplex

Additional

3: Please explain how public key cryptography RSA is used in email security protocol: PGP (Pretty Good Privacy). Please refer to Chapter 8

Solution:

Step

1: Calculate hash (MD5) of message H(m). => you’ve got the digest of the message

Step

2: Encrypt H(m) with Alice’s private key => you’ve got Alice’s signature.

Step

3: Append signature to text, then encrypt it with shared key Ks.

Step

4: Encrypt shared key Ks with Bob’s public key, then append to the cipher text of step 2 => Bob can get the Ks.

Step

5: The result message of step 4 is converted to base64 and be put into an RFC 822 body and be expected to arrive unmodified.

D2 (don’t submit) Many of the functions of an adapter can be performed in software that runs on

the node's CPU. What are the advantages and disadvantages of moving this functionality from the adapter to the node?。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值