RIP protocol and OSPF protocol of common routing protocols

Table of contents

RIP

OSPF

The difference between flooding and broadcasting


 

        A routing protocol is a set of rules used to determine the best path through a network . They are primarily used to exchange routing information between routers in order to find the best path from source to destination.

Common routing protocols:

  1. RIP (Routing Information Protocol): RIP is an interior gateway protocol based on distance vector algorithm. It uses hop count as a metric and allows up to 15 hops. The two versions of RIP are RIPv1 (does not support subnetting and CIDR) and RIPv2 (supports subnetting and CIDR).

  2. OSPF (Open Shortest Path First): OSPF is an interior gateway protocol based on a link state algorithm. It uses cost as a metric and calculates the cost based on bandwidth. OSPF supports subnetting, CIDR, VLSM (Variable Length Subnet Masking), and partitioning in large networks.

  3. EIGRP (Enhanced Interior Gateway Routing Protocol): EIGRP is a hybrid interior gateway protocol based on distance vector and link state algorithms. It uses bandwidth and latency as metrics and supports subnetting, CIDR, VLSM, and fast convergence.

  4. BGP (Border Gateway Protocol): BGP is an exterior gateway protocol based on the path vector algorithm. It is used to exchange routing information between autonomous systems (AS). BGP uses attributes such as AS path length, MED (Multipath Exit Selector) as metrics. The two versions of BGP are BGP-4 (supports CIDR and route aggregation) and BGP-4+ (supports IPv6).

  5. IS-IS (Intermediate System to Intermediate System): IS-IS is an interior gateway protocol based on link state algorithms, mainly used in large networks. It uses cost as a metric and supports subnetting, CIDR, VLSM, and partitioning.

This article mainly analyzes the RIP and OSPF routing protocols.

Both are interior gateway routing protocols used to exchange routing information between routers within the same autonomous system (AS).


RIP

  1. Based on the distance vector algorithm.
  2. Using the hop count as the metric, the maximum hop count is 15 .
  3. Regularly broadcast to update the routing table, once every 30 seconds.
  4. Supports RIPv1 (does not support subnetting, CIDR) and RIPv2 (supports subnetting, CIDR).


    configuration (Cisco routers)
router rip
 version 2
 network 192.168.1.0
 network 192.168.2.0
 no auto-summary

OSPF

  1. Based on link state algorithm.
  2. Use the cost as the metric, calculated in terms of bandwidth.
  3. Supports subnetting, CIDR, VLSM and partitioning.
  4. Use flooding to send link state advertisements (LSAs) instead of scheduled broadcasts.

configuration (Cisco routers)

router ospf 1
 network 192.168.1.0 0.0.0.255 area 0
 network 192.168.2.0 0.0.0.255 area 0

        Flooding way to ensure that all routers receive the latest link state information. A link-state database is built, and then Dijkstra's algorithm is used to calculate the shortest paths to other networks.


 

The difference between flooding and broadcasting

(1) Conceptually:
Flooding: When a node (such as a router) receives a new piece of information, it sends it to all its adjacent nodes, regardless of whether these nodes need the information . This process will continue until the information propagates to all nodes in the entire network.

Broadcasting: Broadcasting is a one-to-many communication method, and the source node will send information to all nodes in the network. Broadcasting is usually done at the data link layer or the network layer.

(2) Scope limitation :

  • Flooding: The spread of information can be limited by setting time-to-live (TTL) or other mechanisms.
  • Broadcast: Often limited by subnet or broadcast domain.

(3) In terms of propagation efficiency, flooding may cause redundant information propagation in the network but can understand the status of other routers in the network in real time . Broadcasting may be more effective in some cases because information is only sent to all nodes in the network once .

Guess you like

Origin blog.csdn.net/lxd_max/article/details/132253976