You are on page 1of 6

Assignment 04

SUBJECT: COMPUTER NETWORKS

PROGRAM: BSSE

SEMESTER: 4 TH

SECTION: U

DATE:15TH DECEMBER,2023

SUBMITTED TO: SIR JEHNZEB

SUBMITTED BY: SAWAIBAH NAVEED CHAUDHRY

70131348

Q1 Explain the following Routing Protocols in your own words by the help

of example:

 Routing Information Protocol (RIP)

Routing Information Protocol (RIP) is a distance vector protocol that uses


hop count as its primary metric. RIP defines how routers should share
information when moving traffic among an interconnected group of local area

networks.
WORKING

If a router receives an update on a route, and the new path is shorter, it will
update its table entry with the length and next-hop address of the shorter
path. If the new path is longer, it will wait through a "hold-down" period to see
if later updates reflect the higher value as well. It will only update the table

entry if the new, longer path has been determined to be stable.


Scenario: Simple Network with RIP

- Network Topology:

- Three routers (A, B, C) in a small network.

- Routing Protocol:

- RIP is implemented on each router.

Initial Routing Tables:

- Router A: Network X (Hop Count: 0)

- Router B: Network Y (Hop Count: 0)

- Router C: Network Z (Hop Count: 0)

-Advertised Routes:

- Router A advertises X (Hop Count: 1) to B and C.

- Router B advertises Y (Hop Count: 1) to A and C.

- Router C advertises Z (Hop Count: 1) to A and B.

Updated Routing Tables:

- Router A: Y (via B, Hop Count: 2), Z (via C, Hop Count: 2)

- Router B: X (via A, Hop Count: 2), Z (via C, Hop Count: 2)

- Router C: X (via A, Hop Count: 2), Y (via B, Hop Count: 2)

Outcome:

- RIP facilitates routing updates, and routers adapt their tables based on advertised routes
and hop counts, enabling communication within the small network.

 Optimized Link State Routing Protocol (OLSR)

OLSR stands for Optimized Link State Routing Protocol. In this, each node
periodically floods status of its links. Each node re-broadcasts link state
information received from its neighbors. Each node keeps track of link state
information received from other nodes. Each node uses above information to

determine next hope to each destination. It is proactive and table-driven.

 Node 6 generates a TC message advertising nodes in MS(6) = {4, 5, 7}.


 Node 4 forwards TC(6) from Node 6 and Node 3 forwards TC(6) from Node
4.
 After nodes 3, 4 and 6 have generated TC messages, all nodes have link-
state information to route to any node.
 It utilizes a technique to reduce message flooding – MultiPoint Relaying
(MPR). In this, each node N in the network selects a set of neighbor nodes
as multipoint relays, MPR(N), that retransmit control packets from N-
Neighbors not in MPR(N) process control packets from N, but they do not
forward the packets. MPR(N) is selected such that all two-hops neighbors of
N are covered by (one-hop neighbors) of MPR(N).

 Border Gateway Protocol (BGP)

Border Gateway Protocol (BGP) is the postal service of the Internet. When someone drops
a letter into a mailbox, the Postal Service processes that piece of mail and chooses a fast,
efficient route to deliver that letter to its recipient. Similarly, when someone submits data
via the Internet, BGP is responsible for looking at all of the available paths that data could
travel and picking the best route, which usually means hopping between autonomous
systems.

If we continue to think of BGP as the Postal Service of the Internet, ASes are like individual
post office branches. A town may have hundreds of mailboxes, but the mail in those boxes
must go through the local postal branch before being routed to another destination. The
internal routers within an AS are like mailboxes. They forward their outbound
transmissions to the AS, which then uses BGP routing to get these transmissions to their
destinations.

Scenario: Enterprise with Dual ISPs

- Enterprise AS: AS100

- ISP A AS: AS200

- ISP B AS: AS300

- BGP Peering:

- The enterprise establishes BGP peering with ISP A and ISP B.

- Route Advertisement:

- The enterprise advertises its IP prefix (e.g., 192.168.1.0/24) to both ISPs.

- BGP Decision Process:

- ISP A and ISP B independently choose the optimal route for the advertised IP prefi x
using BGP's decision process.

- Load Balancing:

- Both ISPs may share traffic load if the enterprise advertises the same IP prefix to both.

- Redundancy:

- If one ISP link fails, BGP swiftly redirects traffic through the available link, ensuring
continuous connectivity.

Outcome:

- BGP provides the enterprise with dual ISP connections, allowing for load balancing and
automatic failover to ensure reliable and efficient Internet connectivity.

 Open Short Path First (OSPF)

In an OSPF network, routers or systems within the same area maintain an identical link-
state database that describes the topology of the area. Each router or system in the area
generates its link-state database from the link-state advertisements (LSAs) that it receives
from all the other routers or systems in the same area and the LSAs that itself generates.
An LSA is a packet that contains information about neighbors and path costs. Based on
the link-state database, each router or system calculates a shortest-path spanning tree,
with itself as the root, using the SPF algorithm.
OSPF has the following key advantages:
 Compared with distance-vector routing protocols such as the Routing
Information Protocol (RIP), OSPF is more suitable for serving large,
heterogeneous internetworks. OSPF can recalculate the routes in a short
amount of time when the network topology changes.
 With OSPF, you can divide an Autonomous System (AS) into areas and keep
area topologies separate to decrease the OSPF routing traffic and the size of
the link-state database of each area.
 OSPF provides equal-cost multipath routing. You can add duplicate routes to
the TCP stack using different next hops.

Scenario: Corporate Network with OSPF

- Topology:

- Main Office (Router A) connected to Branch Office (Router B) through a backbone (Area
0).

- Router Configuration:

- Router A (Main Office):

- Interfaces in Area 0 (Backbone) and Area 1 (Corporate Network).

- Advertises its interfaces and networks to routers in Area 0 and Area 1.

Router B (Branch Office):

- Interfaces in Area 0 (Backbone) and Area 2 (Branch Office Network).

- Advertises its interfaces and networks to routers in Area 0 and Area 2.

Link-State Advertisements (LSAs):

- Router A and Router B generate LSAs containing information about their interfaces and
the networks they can reach.

SPF Algorithm:

- Router A and Router B run the SPF algorithm independently to calculate the shortest
paths within their respective areas.

OSPF Database:
- Router A and Router B maintain OSPF databases, exchanging LSAs with other routers
in the same areas.

Route Calculation:

- Router A calculates the best routes within Area 0 and Area 1 based on SPF and
advertises them.

- Router B calculates the best routes within Area 0 and Area 2 based on SPF and
advertises them.

Dynamic Adaptation:

- If a link fails (e.g., in Area 0), OSPF routers quickly adapt. Routers re-run SPF, adjust
their routing tables, and inform other routers about the changes.

Outcome:

- OSPF enables routers in the enterprise network to have an accurate view of the network
topology, calculate optimal routes, and adapt dynamically to changes, ensuring efficient
and reliable routing within the corporate network .

You might also like