0% found this document useful (0 votes)
42 views

Sheet 2 Solution

This document summarizes and compares the characteristics of hubs, switches, and routers including their cost, processing capabilities, routing rules, and range of coverage. It also provides examples to illustrate the operation and forwarding behavior of switches and routers in a small network. Packet formats, routing tables, and factors affecting delay and throughput are discussed for different network scenarios using switches and routers.

Uploaded by

NhocSkyz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Sheet 2 Solution

This document summarizes and compares the characteristics of hubs, switches, and routers including their cost, processing capabilities, routing rules, and range of coverage. It also provides examples to illustrate the operation and forwarding behavior of switches and routers in a small network. Packet formats, routing tables, and factors affecting delay and throughput are discussed for different network scenarios using switches and routers.

Uploaded by

NhocSkyz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Sheet (2) Solu on

Problem (1):

Hub Switch Router


Cost Least expensive Low High
Processing Capabilities Least intelligent Intelligent Smartest
Routing Rules No routing: incoming Routing is based on MAC Routing is based on
frame is broadcast to address of destination: network address of
all orts except If MAC address exists in destination:
incoming port Routing Table, send Send incoming packet
incoming frame to to output port that
output port that leads to leads to destination.
destination. Otherwise,
incoming frame is
broadcast to all ports
except incoming port
Range of coverage 200 – 250 meters Several hundred meters 10’s to 1000’s
kilometers
OSI layer Physical Data Link Network

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)

Packet format Router (B) Router (C)


input output input output
S U ARP request:
[s,1…1|who is
U?]

No reply

Send pkt to C: [s,c2|S,U|Data] [c1,u|S,U|Data]


G K ARP request:
[g,1…1|who is
K?]
No reply

Send pkt to C: [g,c2|G,K|Data] [c1,b3|G,K|Data]


[c1,b3|G,K|Data] [b2,k|G,K|Data]
A S ARP request:
[a,1…1|who is
S?]
No reply
[a,b1|A,S|Data] [b3,c1|A,S|Data]
Send pkt to B: [b3,c1|A,S|Data] [c2,s|A,S|Data]

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]

Suggested routing tables:

Router (B) Router (C)


Destination O/P port Next Hop destination O/P port Next Hop
D 1 -- D 1 B
A 1 -- A 1 B
F 1 -- F 1 B
K 2 -- K 1 B
U 3 -- U 1 --
S 3 C S 2 --
G 3 C G 2 --
Problem (3):

Scenario [1]:

a)

1stport 2ndport
1 4
2 5
3 6
7 8

b) Message format: [data]


c) Call setup is performed first, so resources are reserved for connection. Then, message is
passed through the circuit.
d) Factors that affects delay are: Message size (P), Source rate (R), Distance between source
and destination (L).
Delay = P/R + L/v, where v is speed of propagation through link.
e) Source speed (rate) = burst size / burst dura on = 1280 bits / 40 ms = 32 Kbps
Switching speed = link speed* #of connections= 32*4 = 128 Kbps

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)

b) Message format: [src MAC, dest MAC| data].


c) Message is passed to the networking box which broadcasts it to all ports except the port it
comes from. Each PC checks the destination address contained in the message and if the
address belongs to the PC, it captures the message. If not it ignores 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), Collision delay (tc), Waiting time(tw).
Delay = P/R + L/v + ts + tc + tw.
e) Link speed (rate) = burst size / burst dura on = 1280 bits / 40 ms = 32 Kbps.
Switching speed = 32 Kbps
f) Average throughput = 1280/100ms= 12.8 Kbps (half-duplex)
This speed is the maximum as there is only one source that can communicate with another
one as switching works by broadcasting the message.

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:

a) In the case of ATM switch,


- Each source will need first to make call setup and wait for reply (at the same time)
- Each source will divide its message into packets with fixed packet size : 53Bytes (
= 48B payload+ 5B header)
- Each source will send the packets to the ATM switch (at the same time)
- At end of transmission, each source will perform call release
b) Frame format for source A: [VCI| Data]
c) This network will not need ARP
d) Time = time for setup + time to send the largest message + time for release
= (t r1+ tp)*2*2 + # of packets *tr2 + (tr1+ tp)*2*2
where, tr1= 53*8/ 25*106 (transmission delay to send call setup).
tp= propagation delay.
tr2= 53*8/ 25*106 (transmission delay to send one packet).
# of packets = #of packets of large message = (2*220/48).

Problem (5):

a) i. Maximum distance between 2 end devices = 100m+50m+50m+100 m=300m.


ii. Maximum throughput = 10 Mbps
b) i. Maximum distance between 2 end devices = 100m+100m+100m+100m=400m.
(Assuming transmission media is unshielded twisted pairs-UTP-copper cable).
ii. Maximum throughput = 4 * 10 Mbps = 40 Mbps (half-duplex).
iii. Maximum throughput = 2 * 40 Mbps = 80 Mbps (full-duplex).
iv. Maximum throughput = 2 * (100 + 3 *10) = 260 Mbps.
c) Assuming that a router is inserted between every two hubs: Maximum throughput = 3 * 10
Mbps = 30 Mbps
The max throughput is tripled as the two routers divide the network into 3 collision
domains. So, each hub may broadcast the received message separately and computers in
different collision domains can communicate without the need to pass the messages to the
other domains.

9
Problem (6):

a)

1
2

1 2
2

According to given distances in the drawing:

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

Router 2 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 3

Router 3 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

Connection setup Switch Input Output


Port VCI Port VCI
A C,H 1 1 0 3 0
2 1 0 4 0
3 0
4 1 0 3 0
F B,G 3 3 0 1 0
2 2 0 1 1
3 1
1 3 1 2 0
4 1 1 2 0
G B,E 4 2 1 1 2
2 3 2 1 2
2 1
1 3 2 2 1
3 1 1 2 0

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

You might also like