Sie sind auf Seite 1von 7

Li Siu Po

(1155088027)

SEEM 5770 Open Systems and Electronic Commerce

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)

SEEM 5770 Open Systems and Electronic Commerce

Assignment 1

c)
2RTT of homework.html, project.html & 3 Figures:
2RTT of User AProxy

+ 2RTT of ProxyRouter

+ 2RTT of RouterServer x5 data files

[(20000bits /20000000bps) x2 + (20000bits/20000000bps) x2 + (20000bits/2000000bps) x2] x5


=(0.002 +0.002 +0.02) x5 =0.12sec
Files transmit time of homework.html & project.html:
Transmit from serverrouter + Transmit from routerproxy + Transmit from proxyuser A x2 data files
[(1000000bits /2000000bps) + (1000000bits /20000000bps) + (1000000bits /20000000bps)] x2
(0.05 +0.05 +0.5) x2 =1.2sec
Files transmit time of 3 Figures:
Transmit from serverrouter + Transmit from routerproxy + Transmit from proxyuser A x3 data files
[(300000bits /2000000bps)

+ (300000bits /20000000bps) + (300000bits /20000000bps)] x3

(0.015 +0.015 +0.15) x3 =0.54sec


Total time: 0.12sec +1.2sec +0.54sec =1.86sec
The part c) with proxy server, the file request need to though proxy server, but the proxy server didnt have the
data files in the first time, then the proxy server need to request the data file from server, so the total time of the
whole download process need to spend more time, more than part a) without proxy server.

Page | 2

Li Siu Po
(1155088027)

SEEM 5770 Open Systems and Electronic Commerce

Assignment 1

d)
2RTT of homework.html & 3 Figures in user B:
2RTT of User BProxy

x4 data files

[(20000bits /20000000bps) x2] x4= 0.008sec


Files transmit time of homework.html in user B:
HTML Transmit from proxyuser B
(1000000bits /20000000bps)= 0.05sec
Files transmit time of 3 Figures in User B:
(300000bits /20000000bps) x3= 0.045sec
2RTT of Project.html in user C:
2RTT of User BProxy
(20000bits /20000000bps) x2 = 0.002sec
HTML transmits time of project.html in user C:
HTML transmits from proxyuser C
(1000000bits /20000000bps)= 0.05sec
Total time: 0.008sec +0.05sec +0.045sec +0.002sec +0.05sec =0.155sec
Part d) with proxy server, because the user A was download the data files though proxy, the cache data files,
then when the user B and C request data files from proxy, which can direct response the data files to user B &
C, thats make the total download time faster than part b) without proxy server.

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)

SEEM 5770 Open Systems and Electronic Commerce

Assignment 1

Q3.
0000 0000 0000 0101

Source port

0000 0000 0010 0011

Dest port

0000 0000 0010 0000

Length

0000 0000 0000 0000

Set Checksum

1000 1001 0101 0011

First 16 bits at first line

0111 1111 0011 0000

Last 16 bits at first line

1010 1101 0100 0111

First 16 bits at second line

1111 0101 0000 1110


Last 16 bits at second line
____________________________________________
10 1001 0110 1110 1001

Sum

1001 0110 1110 1011

Wrap Sum

0110 1001 0001 0100

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)

SEEM 5770 Open Systems and Electronic Commerce

Assignment 1

Result shortest-path tree from s:

1
S

6
2

7
d

1
3

Resulting forwarding table in s:


destination
a
b
c
d
e
f

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

SEEM 5770 Open Systems and Electronic Commerce

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 node b table

From

From

From

a
b
d

a
b
d

a
b
d

From node d table

From

a
b
d

Page | 6

Li Siu Po
(1155088027)

From

From

a
b
d

a
b
d

SEEM 5770 Open Systems and Electronic Commerce

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