Sheet 2 Solution
Sheet 2 Solution
Problem (1):
Problem (2):
a)
Packet format Switch (B) Switch (C)
Out ports Table Out ports Table
S U ARP request: 1, 2 s 3 1 s 2
[s,1…1|who is U?]
ARP reply: s 3 2 s 2
[d,s| I am U] u 3 u 1
Packet: 1
[s,u | S,U | data]
G K ARP request: 1,2 s 3 1 s 2
[g,1…1|who is K?] u 3 u 1
g 3 g 2
ARP reply: 3 s 3 2 s 2
[k,g| I am K] u 3 u 1
g 3 g 2
k 2 k 1
1
Packet: 2 1
[g,k | G,K | data]
A S ARP request: 2,3 s 3 2 s 2
[a,1…1|who is S?] u 3 u 1
g 3 g 2
k 2 k 1
a 1 a 1
ARP reply: 1 1
[s,a| I am S]
Packet:
[a,s| A,S| data] 3 2
D G ARP request: 2,3 s 3 2 s 2
[d,1…1|who is G?] u 3 u 1
g 3 g 2
k 2 k 1
a 1 a 1
d 1 d 1
ARP reply: 1 1
[g,d| I am G]
Packet: 3 2
[d,g | D,G | data]
b)
No reply
2
D G ARP request:
[d,1…1|who is
G?]
No reply
[d,b1|D,G|Data] [b3,c1|D,G|Data]
Send pkt to B: [b3,c1|D,G|Data] [c2,g|D,G|Data]
Scenario [1]:
a)
1stport 2ndport
1 4
2 5
3 6
7 8
3
f) Maximum throughput = Av. Source rate* # of connections
= 1280/100ms* 4 = 51.2 Kbps. (half-duplex)
This throughput is under the condition that 4 PC’s are talking to different PC’s at same time.
Scenario [2]:
a)
Scenario [3]:
a)
Addr port
ess
a 1
b 2
c 3
d 4
e 5
f 6
g 7
h 8
4
b) Message format: [src MAC, dest MAC| data].
c) Message is passed to switching box that checks the destination address and decides which
port it should pass the message to according its routing table.
d) Factors that affect delay are: Message size (P), Source rate (R), Distance between source and
destination (L), Processing time at switching box (ts).
Delay = 2*(P/R + L/v ) + ts.
e) Source speed (rate) = burst size / burst dura on = 1280 bits / 40 ms = 32 Kbps
Switching speed = link speed* #of connec ons= 32*4 = 128 Kbps
g) Average throughput = Av. Source rate* # of connections
= 1280/100ms* 4 = 51.2 Kbps. (half-duplex)
= 1280/100ms* 4*2 = 102.4 Kbps. (full-duplex)
This throughput assumes that 4 PC’s are talking to different PC’s at same time.
Scenario [4]:
a)
Addr port
ess
A 1
B 2
C 3
D 4
E 5
F 6
G 7
H 8
b) Message format: [src MAC, inlet router port MAC| SRC NW, DEST NW| data] (into router)
[outlet router MAC, dest MAC| SRC NW, DEST NW| data]. (out of router)
c) When message is passed to the networking box, it checks the network address of the
destination and then decides the port to pass the message according to routing table. Then,
it changes the source physical address and retransmits the message.
d) Factors that affect delay are: Message size (P), Source rate (R), Distance between source and
destination (L), Processing time at switching box (ts)and queuing delay in router.
Delay = 2*(P/R + L/v ) + ts + tq.
e) Source speed (rate) = burst size / burst dura on = 1280 bits / 40 ms = 32 Kbps
5
Switching speed = link speed* #of connec ons= 32*4 = 128 Kbps
f) Average throughput = Av. Source rate* # of connections
= 1280/100ms* 4 = 51.2 Kbps. (half-duplex)
= 1280/100ms* 4*2 = 102.4 Kbps. (full-duplex)
This throughput assumes that 4 PC’s are talking to different PC’s.
Problem (4):
Scenario1:
a) In the case of hub , the source will need first to make ARP request (packet size 64
Byte) to get physical address of destination so:
- First device A will make ARP to get physical address of C
- Then Device B will make ARP to get physical address of D
- Each source will divide message into packets each packet size 1518Byte(1500B
payload+ 18B header)
- Then each source will send its message in different time
b) Frame format for source A: for ARP Request [a,1…1| who is C], for ARP reply [c,a| I
am C], and for data [a,c| Data]
Frame format for source B: for ARP Request [b,1…1| who is D], for ARP reply [d,b| I
am D], and for data [b,d| Data]
c) This network will need ARP
d) Time =ARP delay for 1st message + ARP delay for 2nd message + time delay to send
two messages
= (2*(tr1+ 2*tp)) + (2*(tr1+ 2*tp))+ # of packets *tr2
Where, tr1= 64*8/ 10*106 (transmission delay to send ARP packet)
tp= propagation delay
tr2= 1518*8/ 10*106 (transmission delay to send one packet)
#of packets = #of packets of 1st message + #of packets of 2nd message
= (1*220/1500) + (2*220/1500)
6
Scenario2:
a) In the case of switch , the source will need first make ARP request (packet size 64 Byte)
to get physical address of destination so:
- First device A will send ARP Request to the switch to get physical address of C.
The switch will broadcast the ARP Request to all ports. C will send ARP
Response to the switch, which will send it only to A
- Device B will send ARP Request to the switch to get physical address of D (at
same time as A). The switch will broadcast the ARP Request from B at a time
different from ARP Request from A. D will send ARP Response to the switch,
which will send it only to B.
- Each source will divide message into packets each packet size 1518Byte(1500B
payload+ 18B header)
- Then each source will send its message (at the same time).
b) Frame format for source A: for ARP Request [a,1…1| who is C], for ARP reply [c,a| I
am C], and for data [a,c| Data]
Frame format for source B: for ARP Request [b,1…1| who is D], for ARP reply [d,b| I
am D], and for data [b,d| Data]
c) This network will need ARP
d) Time =ARP delay for one message + ARP delay (transmit + propagation) from switch
to other devices + time delay to send the largest message
= (2*(2*tr1+ 2*tp)) +( tr1+ tp) + # of packets *tr2
where, tr1= 64*8/ 10*106 (transmission delay to send ARP packet)
tp= propagation delay
tr2= 1518*8/ 10*106 (transmission delay to send one packet)
#of packets = #of packets of large message = (2*220/1500).
7
Scenario3:
a) In the case of router, the source will need first make ARP request (packet size 64
Byte) to get physical address of destination so:
- First device A will make ARP to get physical address of C
- Device B will make ARP to get physical address of D (at subsequent time)
- But there will be no reply to the ARP.
- So, Each source will send ARP again to get physical address of router port
- Each source will divide message into packets each packet size 1518Byte(1500B
payload+ 18B header)
- Then each source will send its message to router in the same time.
- Router will make ARP to get physical address of destination to forward the
packets to it.
b) Frame format for source A: for ARP Request [a,1…1| who is C]. As there will be no
reply, source sends another ARP (to get MAC of router) [a,1…1| who is R1] and gets
ARP Reply [r1,a| I am R1], then for data the source sends [a,r1|A,C| Data]
Frame format for source B: for ARP Request [b,1…1| who is D]. As there will be no
reply, source sends another ARP (to get MAC of router) [a,1…1| who is R2] and gets
ARP reply [r2,b| I am R2], then for data the source sends [b, r2| B, D| Data]
c) This network will need ARP
d) Time =1st ARP pkt delay (Source A) + no reply delay (Source A) + 2nd ARP pkt delay
(Source A) + ARP response delay (Source A) + transmission time & propagation time
to send first packet + ARP Request pkt delay (router) +ARP Response pkt delay
(router)+ time to send the largest message + propagation delay for last packet
= (tr1+ tp) + (t r1+ tp) + (t r1+ tp) + (tr1+ tp) +(t r2 + tp) + (t r1+ tp) + (tr1+ tp) + # of
packets *tr2+tp
where, tr1= 64*8/ 100*106 (transmission delay to send ARP packet)
tp= propagation delay
tr2= 1518*8/ 100*106 (transmission delay to send one packet)
#of packets = #of packets of largest message = (2*220/1480)
8
Scenario4:
Problem (5):
9
Problem (6):
a)
1
2
1 2
2
All links inside hospital will use copper UTP (between PC’s and switches – between Servers
and switches – between routers and switches – between citizen at home and router)
Links between R1 and R2, between R2 and R3 will depend on the actual topology and can be
:
Copper cables with DSL (Digital Subscriber Line) devices – Optical Fibers – Microwave Links
b) Routing tables:
Router 1 Port Next hop
C(1,1) – C(30,1) 1 --
C(1,2) – C(50,2) 1 --
C(1,4) – C(40,4) 1 --
C(1,5) – C(10,5) 1 --
Citizen at home 2 Router 2
10
For transmission from C(1,1) C(1,3): switches S1, S2, S3 and S6 should have proper MAC
entries in their routing tables (give details).
For transmission from Citizen at home to C(2,5), use is made of above routing tables for R1,
R2, R3, as well as the proper MAC entries for switches S6 and S7.
Problem (7):
For connectivity between devices inside the school, between devices inside the MoE, and between
school, MoE, student and the outside world, refer to remarks of Problem 6 above.
Problem (8):
11
a) Routing tables
b)
c) For SW1 , there are 2 devices connected to it (device A and Device B), so output buffer for
SW1 will be divided among them & each device takes 1MB. Since each device has average bit
rate =3Mbps, then:
Output link (of speed 25 Mbps) can accommodate the tra c produced by the two devices (A &
B) 3 Mbps + 3 Mbps < 25 Mbps
Leaky bucket parameters are:
Burst size = 1 MB
Average rate = 3 Mbps
d) Maximum delay= max .buffer size / max. Capacity=2MB/25Mbs=16*220/ 25*106 = 0.671 sec.
12