Vous êtes sur la page 1sur 3

ComputerCommunication Networks

All of the following homeworks are in the JKR Textbook 7th Edition
Homework 3,Chapter 3 – P2, P3, P4, P26, P27.

P2.
Consider that the IP addresss of the hosts A,B,C are X,Y,Z
From Web server B to host A:
+ Source port: 80
+ Destination port: 26145
+IP address source: Y
+IP address destination:X
From Web server B to host C( left process):
+ Source port : 80
+ Destination port: 7532
+IP address source: Y
+IP address destination: Z
From Web server B to host C(right process):
+ Source port: 80
+ Destination port: 26145
+IP address source: Y
+IP address destination: Z
P3.
01010011, 01100110, 01110100
- First, find the sum of 01010011 and 01100110:
01010011
+
01100110
10111001
- Now, add the resultant of the sum of the first two bytes to the last byte
01110100.

10111001
+
01110100
(1)00101101
- There is a carry for the above sum. Now wrap around the carry by adding it to
the last 8 bits of the above resultant.
00101101
+
1
00101110
 Checksum: 11010001.
- To detect errors, the receiver adds the four words (the three original words
and the checksum). If the sum contains a zero, the receiver knows there has
been an error. All one-bit errors will be detected, but two-bit errors can be
undetected (e.g., if the last digit of the first word is converted to a 0 and the
last digit of the second word is converted to a 1).

P4.
a, The sum of 01011100 and 01100101 is as follows:
01011100
+
01100101
11000001
By converting 0’s to 1’s and 1’s to 0’s, we have 1’s complement of the sum of 2
bytes 01011100 and 011000101 is 00111110
b, The sum of 11011010 and 01100101 is as follows:
11011010
+
01100101
(1) 00111111
- There is a carry for the above sum. Now wrap around the carry by adding it to
the last 8 bits of the above resultant.
00111111
+
1
01000000
By converting 0’s to 1’s and 1’s to 0’s, we have 1’s complement of the sum of 2
bytes 11011010 and 01100101 is 10111111.
c, First byte = 01010100
Second byte = 01101101

P26.
a, The size of TCP sequence number field = 4 bytes = 32 bits
Therefore, the possible sequence numbers = 232 = 4292967296.
The sequence number increments by the number of bytes of data sent. It does
not increment by one. Therefore, the size of the MSS is irrelevant. The
maximum file size sent does not depend on MSS.
Maximum file that can be sent from Host A to Host B is given by the number
of bytes representable by 232 Gbytes .
b, 232/536=8012998.68657
 The number of segment is: 8012999
Total number of bytes header: 8012999*66=528857934 bytes.
Total number of bytes transmitted : 232+ 528857934=4824*109 bytes.
The time to transmit the file over a 155 Mbps link:
(4824*109)/(155*106)=249 (s)

P27. HOST A HOST B


a, SP# = 302
DP# = 80
Seq# = 207 Seq#=127;SP#=302;DP#=80;data= 80 bytes
b, SP# = 302
DP# = 80
ACK# =207 Seq#=127;SP#=302;DP#=80;data= 80 bytes
c, ACK# =127 TimeOut interval ACK#= 247
d, Seq# = 127
Data = 80
ACK# = 247

Seq#=127;SP#=302;DP#=80;data= 80 bytes

TimeOut interval ACK# = 247

Vous aimerez peut-être aussi