Assignment 4 1: Interior Routing Protocol Assignment - Hsanokklis/2023-2024-Tech-journal GitHub Wiki
RIPv2 and OSPF Research
What is RIP (Routing Information Protocol?
RIP defines how routers should share information when moving traffic among an interconnected group of local area networks.
RIP uses a distance vector Algorithm to decide which path a packet should be put on in order to get to its destination.
Each RIP router maintains a routing tables with a list of all the destination the router knows about/can reach
Routers broadcast their entire routing table to their closest neighbors every 30 seconds.
- Neighbors are other routers connected directly(on the same network segment as the broadcasting router)
- The neighbors then pass it to their neighbors until all the routers in the network have the same knowledge of routing paths.
Shared knowledge is known as convergence
If a router receives an update that there is a shorter path for a packet to take to get to a certain destination, it will update its routing table with that new route.
If a router receives an update that there is a new longer path for a packet, it will wait for a hold-down period to see if there are anymore updates with shorter paths. If not then it will update the table with the longer path once it is deemed stable.
If a router/network crashes this is discovered because it will stop broadcasting its routing table.
- If the router is unresponsive for 6 update cycles/180 seconds the other RIP routers will drop the router from its routing table.
The difference between RIPv1 and RIPv2
RIPv1
- A classful routing protocol
- Subnet masks are not included in routing updates
- Broadcasts the routing table to the address 255.255.255.255
RIPv2
- A classless routing protocol
- Subnet masks are included in routing updates
- Mulitcasts entire routing table to all adjacent routers
It will cast the routing table at the address 224.0.0.9.
Types of casts
The term cast refers to data(a stream of packets) that is being transmitted to a recipient from the sender with some sort of communication channel.
Unicast
This is a type of data transfer that is best used when there is a single sender and a single recipient. This can also be known as a one-to-one transmission and is the most common form of data transfer over networks.
Broadcast
Broadcasting transfers(one-to-all) are split into 2 different categories:
Limited Broadcasting
Used for sending a stream of packets to all the devices over your network.
It will do this by attaching the Limited Broadcasting Address(255.255.255.255) to the destination address of the packet header
Direct Broadcasting
This is best used when a device in one network wants to transfer a packet stream to all the other devices in another network.
This is done with the Direct Broadcast Address by translating all the host ID bits of the destination address to 1, in the packet header.
This type of broadcasting is mainly used for television and audio distribution.
Multicast
On a broadcast network, only certain designated receivers will receive the data transmission
The router will determine if hosts have been configured to receive multicast packets using the IGMP protocol (Internet Group Management Protocol)
Visualization of Cast Types
Benefits and Downsides to each Cast types
Classful vs Classless Routing Protocols
Classful Routing
Classful routing DOES NOT send the subnet masks with their updates. Classful routing uses the class of an IP address to make routing decisions.
The Router will assume the natural mask for an IP address within its class as in:
- A ---> /8
- B ---> /16
- C ---> /24
Older routing protocols use classful routing such as
- RIPv1
- IGRP
Classless routing
Classless routing DOES send the subnet masks with their updates. Its called "classless routing" because routing decisions are not tied to the class of the IP address (A,B,C). They are based on any portion of the 32-bit IP address specified in the mask.
Newer routing protocols use classless routing such as
- RIPv2 EIGRP OSPF
Open Shortest Path First (OSPF)
OSPF is a routing protocol used to find the best path for packets as they pass through a set of connected networks. It was designed with the goal of moving traffic around a larger autonomous system such as an enterprise network(which can be made up of many separate LAN networks linked through router)
The OSPF protocol has replaced RIP in cooperate networks
When a router gets wind that there is a change to a routing table immediately multicasts that info to all the other OSPF hosts in the network.
OSPF will only send its routing tables when there is a change made/an update
- Similarly it will only send the part of the routing table that has been updated and not the entire thing.
Instead of counting hops, OSPF makes decisions based on link states that take into account additional network info such as cost.
To find the shortest path the routers have to use the Dijkstra algorithm .
Link State Vs Distance Vector Routing
Distance Vector Routing is the routing protocol that selects the path based on parameter distance (hops) and Link State Routing is the routing protocol that chooses the best path based on the cost of the path.
Link State Routing
Each router shares the knowledge of its neighborhood with every other router and there are 3 things that define link state routing:
Three separate tables are created by every link state router:
- One used for storing info related to the directly connected neighbors
- One used to store info about the topology of the entire network
- An actual routing table
Knowledge about the neighborhood:
- Instead of sending its entire routing table, a router sends info about its neighborhood only.
- A router will then broadcast its information and costs to the directly attached links to other routers.
Flooding:
- Each router sends the information to every other router on the internetwork except its neighbors.
- Every router that receives a packet will then send it to all of its neighbors
Information Sharing:
- A router sends the information to every other router only when the change occurs in the information.
Link state routing has 2 phases
Reliable Flooding
- routers know the cost of their neighbors Route Calculation
- Routers use Dijkstra's algorithm to calculate the shortest possible path to get packets to their destination.
Cost
Cost can be defined at the price of sending traffic out of a given interface.
Represents the delay/time it takes for a packet to traverse a network link
More traffic means more cost which is not effective.
Using OSPF compared to RIP is more cost-effective
Can include available bandwidth
Distance Vector Routing
Requires that a router inform its neighbors of topology changes periodically.
Each router contains a distance vector table that contains the distance between itself and ALL possible destinations hosts. (routing table).
It is easier to maintain the link-state routing
It is slower the converge than link state routing
It creates more traffic due to hop counting
- Having to broadcast updates so often causes a waste of bandwidth
Uses the UDP protocol for transportation.
Sources Used for Research:
-
https://www.oreilly.com/library/view/ip-routing/0596002750/ch05s04.html
-
https://www.geeksforgeeks.org/distance-vector-routing-dvr-protocol/
-
https://www.scaler.com/topics/distance-vector-routing-vs-link-state-routing/
Deliverables
RIPv2 Packet Header
RIP
1. The job of any routing protocol is to provide a mechanism for exchanging information about routes so routers can keep their routing tables up-to-date. Describe in your own words (a few sentences and/or detailed bullet points) the mechanism RIP uses so that routers in a network can build their routing table. (2 Points)
RIP or routing information protocol defines how data should best be transmission via routers on a Local area network via distance vector protocol. To do this routers configured with RIP broadcast what is know as a routing table(a list of all destinations the router knows how to reach) every 30 seconds to their closest neighbor router(closest means directly connected). The neighbor will then broadcast its routing table to its neighbors and so on a so forth, until all the routers configured with RIP on the network know about each other and about which paths they are able to send and receive data packets on.
Source Used:
1. Describe in your own words, how RIP uses the Route Distance Metric (1 Point)
RIP uses the hop count to find the best possible route to a host or network. This will determine how many routers a date packet will have to go through to reach its final destination. The maximum hop count is 15, if a network has a hop count of more then 15, it is considered to be unreachable.
Sources Used:
- Describe in your own words (a few sentences or detailed bullet points) the limitations of RIP on a larger network (2 Points)
- Hop Count
Since RIP does not support a hop count of more then 15 within the same network, it might take longer for a packet to be transmitted as it might take more time for the routers to figure out the shortest path to deliver the packet, or if they even can deliver it all all
Source Used:
Open-Shortest Path First(OSPF)
- Describe in your own words (a few sentences and/or detailed bullet points) the mechanism OSPF uses so that routers in a network can build their routing table and how it differs from RIP v2. (2 Points)
The OSPF or Open-Shortest Path First protocol uses link state routing that take into account the cost of a path rather then the hop count. This means that when sending a packet to a destination routers will look at the delay/time it would take for a packet to traverse a network link(cost). Link state routers create 3 separate tables: One for storing information about connected neighbors, one for the network topology and one as an actual routing table. Similarly, link-state routers operate in 2 phases. Phases one being the router establishing the cost of their neighbor and step 2 being the calculation of the shortest possible path using Dijkstra's algorithm. Unlike RIP, when a change is made to a router, the entire routing table does not need to be broadcasted. Instead just the change is broadcasted and routers will update accordingly. The biggest difference between RIP and OSPF is how it sends data. RIP sends data based on hop count (with a max of 15) and OSPF sends data based on the cost and does not account for hops. This is why OSPF is generally used in enterprises as there are many interconnected LAN's that would take more then 15 hops to transmit a packet to them.
Sources Used:
- https://www.techtarget.com/searchnetworking/definition/OSPF-Open-Shortest-Path-First?Offer=abMeterCharCount_var3
- https://www.metaswitch.com/knowledge-center/reference/what-is-open-shortest-path-first-ospf#:~:text=The%20OSPF%20protocol%20is%20a,the%20topology%20of%20the%20AS.
- https://orhanergun.net/ospf-cost#:~:text=The%20OSPF%20cost%20is%20calculated,the%20more%20preferable%20the%20link.
- Describe in your own words, how OSPF uses the "Cost" Metric (1 Point)
_The Cost metric in context of the OSPF routing protocol accounts for the time/delay of a network connection that a packet will traverse. The lower the cost, the more likely a packet will be send via that route, as it is considered more cost-effective.
The next questions are based on the following router network. Each interface includes a network address and cost
1. RIP is a vector distance router protocol. It considers the number of hops to reach a destination and picks the shortest one. Based on hop count. what is the shortest path between the client computer in the lower left and the server in Burlington, Vt and the number of hops. (1 Point)
6 hops is the shortest route from PC0 to the Burlington Router
1. OSPF is a cost-based protocol and determines the path with the least cost. Based on cost, find the lowest cost path between the client computer in the lower left and the server in Burlington, Vt. and what is the total cost of the route? (1 Point)
140 is the lowest cost from PC0 to the Burlington Router