(1155088027)
Assignment 1
Q1.
-Average object size: 100000 bits
-Request file size: 10000 bits
-Responses file size: 10000 + 1000000 = 1010000 bits
20Mbps= 20000000bps
2Mbps= 2000000bps
2RTT+transmit time = total time
a)
2RTT of homework.html, project.html & 3 Figures
[(20000bits /20000000bps) x2 + (20000bits/2000000bps) x2] x5= (0.002+0.02) x5 =0.11sec
Files transmit time of homework.html & project.html:
[(1000000bits /20000000bps) + (1000000bits /2000000bps)] x2= (0.05+0.5) x2 =1.1sec
Files transmit time of 3 Figures:
[(300000bits /20000000bps) + (300000bits /2000000bps)] x3= (0.015+0.15) x3 =0.495sec
Total time: 0.11sec +1.1sec +0.495 =1.705sec
b)
2RTT of homework.html & 3 Figures in user B:
[(20000bits /20000000bps) x2 + (20000bits/2000000bps) x2] x4= (0.002+0.02) x4 =0.088sec
Files transmit time of homework.html in user B:
[(1000000bits /20000000bps) + (1000000bits /2000000bps)]= (0.05+0.5) = 0.55sec
Files transmit time of 3 Figures in User B:
[(300000bits /20000000bps) + (300000bits /2000000bps)] x3= (0.015+0.15) x3 =0.495sec
2RTT of Project.html in user C:
[(20000bits /20000000bps) x2 + (20000bits/2000000bps) x2] = (0.002+0.02) =0.022sec
Files transmit time of project.html in user C:
[(1000000bits /20000000bps) + (1000000bits /2000000bps)]= (0.05+0.5) = 0.55sec
Total time: 0.088sec +0.55sec +0.495sec +0.022sec +0.55sec =1.705sec
Page | 1
Li Siu Po
(1155088027)
Assignment 1
c)
2RTT of homework.html, project.html & 3 Figures:
2RTT of User AProxy
+ 2RTT of ProxyRouter
Page | 2
Li Siu Po
(1155088027)
Assignment 1
d)
2RTT of homework.html & 3 Figures in user B:
2RTT of User BProxy
x4 data files
Q2.
In NAK protocol, if one of the packet was lost, it would be detected when next packet was received. thats
mean the receiver receives the packet one by one, receiver only know the pervious packet was missed when
next one packet received. Under a NAK only protocol, when long delay was happened between the
transmission of previous packet and the transmission of next packet, then it will be a long time until next packet
can be recovered.
Page | 3
Li Siu Po
(1155088027)
Assignment 1
Q3.
0000 0000 0000 0101
Source port
Dest port
Length
Set Checksum
Sum
Wrap Sum
Checksum
Q4.
Step
0
1
2
3
4
5
N
s
sa
saf
safe
safec
safecbg
d
D(a),p(a)
1,s
D(b),p(b)
9, a
9, a
9, a
1, c
D(c),p(c)
7, a
7,a
1, c
D(d),p(d)
6,s
6, s
4, f
4, f
1, c
D(e),p(e)
1, e
D(f),p(f)
2,s
2, s
D(g),p(g)
8, f
3, e
1, c
Page | 4
Li Siu Po
(1155088027)
Assignment 1
1
S
6
2
7
d
1
3
Link
(s, a)
(s, f)
(s, f)
(s, f)
(s, f)
(s, f)
Q.5
From node a table
From
From
a
b
d
a
b
d
a
0
Cost to
b
c
d
14
e
5
a
0
14
3
b
8
0
8
Cost to
c
d
7
3
1
8
e
5
Cost to
c
d
Page | 5
Li Siu Po
(1155088027)
From
a
b
d
0
8
3
8
0
8
7
1
9
3
8
0
5
3
5
14
Cost to
c
d
1
8
a
0
8
3
Cost to
b
c
d
14
3
0
1
8
8
e
5
3
a
0
8
3
b
8
0
8
Cost to
c
d
7
3
1
8
9
0
e
5
3
5
Cost to
c
d
Assignment 1
From
From
From
a
b
d
a
b
d
a
b
d
From
a
b
d
Page | 6
Li Siu Po
(1155088027)
From
From
a
b
d
a
b
d
a
0
14
3
a
0
8
3
Cost to
b
c
d
14
3
0
1
8
8
9
0
e
5
Cost to
c
d
7
3
1
8
9
0
e
5
3
5
b
8
0
8
Assignment 1
Page | 7