You are on page 1of 8

FACULTY OF ENGINEERING, SCIENCES & TECHNOLOGY

Subject: Routing & Switching Instructor: Ali Ahmad Siddiqui


Program: All Programs Allocated Marks: 15

Assignment # 03– Spring Semester 2020

Student Name: Muhammad Usman Afaq

Registration Number: 38144

Program: BSCS

Student Signature:

Page 1 of 8
PART A

1. Draw the OSI and TCP/IP Models, side by side to show the relevant layers of both
Protocol Stacks.

APPLICATION LAYER

PRESENTATION APPLICATION LAYER


LAYER

SESSION LAYER

TRANSPORT LAYER TRANSPORT LAYER

NETWORK LAYER NETWORK LAYER

DATA LINK LAYER


NETWORK ACCESS
LAYER
PHYSICAL LAYER

OSI MODEL TCP/IP MODEL

Page 2 of 8
PART B

1. Write down Components of data communication system.

Ans: There are 5 component of data communication and these are:


1. Message
2. Sender
3. Receiver
4. Protocol
5. Transmission medium

2. On what three characteristics effectiveness of Data Communication system depends.

Ans: 1. Accuracy
2. Delivery
3.Time

3. Define Topology and write down its types (names only for different Topologies).

Ans: TOPOLOGY: Topology is the representation of a network


arrangement, connecting various nodes(sender and receiver) through
lines of connections.
Types of topologies:
1. Bus topology
2. Ring topology
3. Mesh topology
4. Star topology
5. Point-to-point
4. In a Fully Connected Mesh Topology there are 400 devices. How many numbers of
connection / links will be in this Topology? Also, how many Interfaces would be
required on each node / device?

Ans: Numbers of connections are = 600 connection


Numbers of interface in each node = 399

5. Which Layers in TCP/IP model attach header and Trailer with the payload?

Ans: In TCP/IP model header and trailer is attached in DATA LINK Layer.

PART C

Page 3 of 8
1. Routing Information Protocol (RIP) is an Interior routing protocol, which uses
distance vector routing. It uses Bellman-Ford algorithm for calculating the routing
table.

Write down the RIP routing table updating algorithm (Bellman-Ford algorithm).

function BellmanFord(list vertices, list edges, vertex source)


::distance[],predecessor[]
// Step 1: initialize graph for each vertex v in vertices:
distance[v] := inf
predecessor[v] := null
distance[source] := 0
// Step 2: relax edges repeatedly
for i from 1 to size(vertices)-1:
for each edge (u, v) with weight w in edges:
if distance[u] + w < distance[v]:
distance[v] := distance[u] + w
predecessor[v] := u
// Step 3: check for negative-weight cycles
for each edge (u, v) with weight w in edges:
if distance[u] + w < distance[v]:
error "Graph contains a negative-weight cycle"
return distance[], predecessor[]

2. Open Shortest Path First (OSPF) is an Interior routing protocol, which uses link state
routing. It uses Dijkstra’s Algorithm for calculating the routing table.

Write down the OSPF routing table updating algorithm (Dijkstra’s Algorithm).

function Dijkstra(Graph, source):

create vertex set Q

for each vertex v in Graph:


dist[v] ← INFINITY
prev[v] ← UNDEFINED
add v to Q
dist[source] ← 0

Page 4 of 8
while Q is not empty:
u ← vertex in Q with min dist[u]

remove u from Q

for each neighbor v of u: // only v that are still in Q


alt ← dist[u] + length(u, v)
if alt < dist[v]:
dist[v] ← alt
prev[v] ← u
return dist[], prev[]

PART D

Short Answers only:

1. Discuss the (three) Layer 2 switching and bridging operating modes.

ANS: Layer 2 Switching operation Modes:


1. Store-and -forward
Wait until the whole message is received, perform error
control, and then transmit it

2. Cut-through:
Read destination address and start transmitting . Without
waiting for the entire message is received

3. Fragment-free
Read the first 64 byte segment (contains the header)
Layer 2 bridging Operation Modes:

2. Describe how LAN switches use and populate the MAC address table.

ANS: Switches that provide a separate connection for each node in a company's


internal network are called LAN switches. A LAN switch builds its MAC address table by
recording the MAC address of each device connected to each of its ports.
The switch uses the information in the MAC address table to send frames destined for a
specific device out the port, which has been assigned to that device.

Page 5 of 8
3. What is the benefit(s) of Redundant Topology? What are the problems introduced by
Redundant Topology? What is/are the solutions available to deal with those problems
in Redundant Topology?

ANS: Benefits:
 Redundant topology eliminates single points of failure.
 Provide Backup path.

Problems:
1) Broadcast Storm:
A switch forwards out the broadcast frame, generated by another device, to all its
ports. If no loop avoidance schemes are applied then the switches will flood
broadcasts endlessly throughout the network which consumes all the available
bandwidth. This phenomenon is called broadcast storm.
Solution:
 Identify the source
 Research the process that’s broadcasting
 Separate the network into smaller broadcast domains

2) Multiple copies:
A device can receive multiple copies of the same frame if a frame arrives from
different network segments at the same time.
Solution:
• To overcome this problem, Spanning tree must be enabled on the switches.

3) MAC table thrashing:


Switches use MAC address table to forward out the frames. When a switch
receives a frame, it makes an entry of the device mac address with the switch
port on which the frame is received but if the switch receives the frame of same
source from more than one link then it will be confusing for switch to make an
entry in the MAC table. It will lead to instability of MAC table.
Solution:
• Use STP (Spanning Tree Protocol) to overcome this problem

4. What is STP? Define its Operation (Rules / Mechanism).

Page 6 of 8
STP (Spanning Tree Protocol):
The Spanning Tree Protocol (STP) is responsible for identifying links in the network and
shutting down the redundant ones, preventing possible network loops.
Operations:
In STP, all switches in the network exchange BPDU messages between them to agree upon the

root bridge. Once they elect the root bridge, every switch has to determine which of its ports will

communicate with the root port.

If more than one link connects to the root bridge, then one is elected as the forwarding port

(Designated Port) and the others are blocked.

5. Complete the following table with required information:

Link Speed Cost (Revised IEEE spec) Cost (previous IEEE spec)
10Gbps 2 1
1 Gbps 4 1
100 Mbps 19 10
10 Mbps 100 100

6. Draw the Spanning-Tree Port States showing how Spanning-tree transits each port
through several different states.

Page 7 of 8
1. The root bridge needs to be elected. Two fields combined together identify the
root bridge: MAC address and Priority value. Without manual configuration all
switches have the same priority therefore it is up to the MAC address to decide upon
the root bridge. The switch with the lowest MAC address value is elected as the root
bridge. In the diagram above Switch C is the elected root bridge.

2. Once the root bridge is elected, each switch needs to identify a single root port -
the port closest to the route bridge. This port will always be in the forwarding state.
By default all ports of the route bridge are in the forwarding state. Moreover, one port
per segment (called designated port) is allowed to be in the forwarding state.

3. We have 2 ports on switch A and two ports on switch B that belong to the same
segment. Therefore, two of them need to be blocked to avoid loops. Since switch B
has higher MAC address value (hence lower priority), its designated ports need to be
blocked.

Q7) What are the benefits of Hierarchical

7. What are the benefits of Hierarchical Network?

ANS: 1.Scalability
2.Security
3.Redundancy
4.Performance
5. Maintainability

8. What are the three Layers in the Hierarchical Network Design Model?

ANS: The hierarchical network model uses three layers. These are
the Core, Distribution, and Access layers

9. Also describe the Switch Features at each relevant layer.

Page 8 of 8

You might also like