

{"id":104634,"date":"2021-12-23T09:00:06","date_gmt":"2021-12-23T03:30:06","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=104634"},"modified":"2021-12-23T12:10:58","modified_gmt":"2021-12-23T06:40:58","slug":"routing-algorithms","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/routing-algorithms\/","title":{"rendered":"Routing Algorithms in Computer Network"},"content":{"rendered":"<p>The network layer must find the optimum path by which packets may be transferred in order to convey them from the source to the destination.<\/p>\n<p>The network layer&#8217;s principal duty, whether it offers datagram service or virtual circuit service, is to provide the optimum path. This function is performed by the routing protocol.<\/p>\n<p>A routing protocol is a routing technique that finds the shortest path from the source to the destination. The optimal way is the &#8220;least-cost path&#8221; from the source to the destination.<\/p>\n<p>Routing is the process of forwarding packets from source to destination, but the routing algorithm determines the optimum path to take.<\/p>\n<h3>Classification of a Routing Algorithm:<\/h3>\n<p>Routing algorithm are broadly classified into 2 categories:<\/p>\n<h4>1. Adaptive Routing Algorithm:<\/h4>\n<p>A dynamic routing algorithm is another name for an adaptive routing method. This algorithm determines routing decisions depending on network structure and traffic. This algorithm&#8217;s major parameters are hop count, distance, and predicted transit time.<\/p>\n<p>Adaptive Routing algorithms can be classified into 3 types:<\/p>\n<h4>a. Centralized algorithm:<\/h4>\n<p>It is also known as the global routing algorithm because it computes the least-cost path between source and destination by utilizing comprehensive and global network knowledge.<\/p>\n<p>This algorithm takes as input the connection between the nodes and the link cost, and this information is collected before any calculations are performed.<\/p>\n<p>Because it is aware of the cost of each connection in the network, the link state algorithm is referred to as a centralized algorithm.<\/p>\n<h4>b. Isolation algorithm:<\/h4>\n<p>It is an algorithm that derives routing information by utilizing local data rather than getting data from other nodes.<\/p>\n<h4>c. Distributed algorithm:<\/h4>\n<p>It is also known as a decentralized algorithm since it computes the least-cost path between source and destination in an iterative and distributed manner.<\/p>\n<p>No node in the decentralized algorithm is aware of the cost of all network links. Initially, a node maintains just information about its own directly associated links and computes the least-cost path to the target through an iterative computation process.<\/p>\n<p>A Distance Vector Routing algorithm is a decentralized method since it never knows the entire path from source to destination; instead, it knows the direction in which the packet should be transmitted as well as the least expensive way.<\/p>\n<h4>2. Non-adaptive routing algorithm:<\/h4>\n<p>Static routing algorithm is another name for a non-adaptive routing method. When the network boots up, the routing information is stored on the routers.<\/p>\n<p>Non-adaptive routing algorithms do not make routing decisions by relying on network topology or traffic.<\/p>\n<p>Non-adaptive routing algorithms can be classified into 2 types:<\/p>\n<h4>a. Flooding:<\/h4>\n<p>In the event of flooding, every arriving packet is sent to all outbound connections save the one that has already been reached. The drawback of flooding is that each node may have several copies of the same message.<\/p>\n<h4>b. Random Walks:<\/h4>\n<p>In the case of random walks, a packet is sent by the node at random to one of its neighbours. The usage of random walks has the advantage of efficiently using alternate pathways.<\/p>\n<h3>Difference between Adaptive and Non-Adaptive Routing algorithms:<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>Parameter<\/b><\/p>\n<\/td>\n<td>\n<p style=\"text-align: left;\"><b>Adaptive Routing <\/b><b>Algorithm<\/b><\/p>\n<\/td>\n<td>\n<p style=\"text-align: left;\"><b>Non-Adaptive Routing Algorithm<\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><b>Definition<\/b><\/td>\n<td><span style=\"font-weight: 400;\">The adaptive routing algorithm is a routing table construction technique that is dependent on network circumstances.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The Non-Adaptive Routing method creates a static table to select which node to transmit the packet to.<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Usage<\/b><\/td>\n<td><span style=\"font-weight: 400;\">Dynamic routing employs the adaptive routing method.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Static routing employs the Non-Adaptive Routing method.<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Routing Decision<\/b><\/td>\n<td><span style=\"font-weight: 400;\">Topology and network traffic are used to make routing decisions.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The static tables are used to make the routing decisions.<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Categorization<\/b><\/td>\n<td><span style=\"font-weight: 400;\">There are three types of adaptive routing algorithms: centralized, isolated, and distributed.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Non-adaptive routing algorithms include floods and random walks.<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Complexity<\/b><\/td>\n<td><span style=\"font-weight: 400;\">Algorithms for adaptive routing are more sophisticated.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Non-Adaptive Routing algorithms are straightforward.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Summary:<\/h3>\n<p>In this article, we covered the different types of routing algorithms, which are adaptive and non-adaptive routing algorithms. We also looked at the various subtypes under the aforementioned categories. Lastly, we looked at a direct comparison between adaptive and non-adaptive routing algorithms.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The network layer must find the optimum path by which packets may be transferred in order to convey them from the source to the destination. The network layer&#8217;s principal duty, whether it offers datagram&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":105221,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24974],"tags":[25997,25998,25996,25999],"class_list":["post-104634","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computer-network","tag-adaptive-routing-algorithm","tag-non-adaptive-routing-algorithm","tag-routing-algorithm","tag-routing-algorithms"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Routing Algorithms in Computer Network - DataFlair<\/title>\n<meta name=\"description\" content=\"See what is routing algorithm. Learn different types of routing algorithms in Computer Network - adaptive and non-adaptive routing algorithms.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/routing-algorithms\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Routing Algorithms in Computer Network - DataFlair\" \/>\n<meta property=\"og:description\" content=\"See what is routing algorithm. Learn different types of routing algorithms in Computer Network - adaptive and non-adaptive routing algorithms.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/routing-algorithms\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-23T03:30:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-23T06:40:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/routing-algorithms.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Routing Algorithms in Computer Network - DataFlair","description":"See what is routing algorithm. Learn different types of routing algorithms in Computer Network - adaptive and non-adaptive routing algorithms.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/routing-algorithms\/","og_locale":"en_US","og_type":"article","og_title":"Routing Algorithms in Computer Network - DataFlair","og_description":"See what is routing algorithm. Learn different types of routing algorithms in Computer Network - adaptive and non-adaptive routing algorithms.","og_url":"https:\/\/data-flair.training\/blogs\/routing-algorithms\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2021-12-23T03:30:06+00:00","article_modified_time":"2021-12-23T06:40:58+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/routing-algorithms.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/routing-algorithms\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/routing-algorithms\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Routing Algorithms in Computer Network","datePublished":"2021-12-23T03:30:06+00:00","dateModified":"2021-12-23T06:40:58+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/routing-algorithms\/"},"wordCount":663,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/routing-algorithms\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/routing-algorithms.webp","keywords":["Adaptive Routing Algorithm","Non-adaptive routing algorithm","Routing Algorithm","Routing Algorithms"],"articleSection":["computer network tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/routing-algorithms\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/routing-algorithms\/","url":"https:\/\/data-flair.training\/blogs\/routing-algorithms\/","name":"Routing Algorithms in Computer Network - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/routing-algorithms\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/routing-algorithms\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/routing-algorithms.webp","datePublished":"2021-12-23T03:30:06+00:00","dateModified":"2021-12-23T06:40:58+00:00","description":"See what is routing algorithm. Learn different types of routing algorithms in Computer Network - adaptive and non-adaptive routing algorithms.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/routing-algorithms\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/routing-algorithms\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/routing-algorithms\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/routing-algorithms.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/routing-algorithms.webp","width":1200,"height":628,"caption":"routing algorithms"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/routing-algorithms\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"computer network tutorial","item":"https:\/\/data-flair.training\/blogs\/category\/computer-network\/"},{"@type":"ListItem","position":3,"name":"Routing Algorithms in Computer Network"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/104634","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=104634"}],"version-history":[{"count":3,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/104634\/revisions"}],"predecessor-version":[{"id":106953,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/104634\/revisions\/106953"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/105221"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=104634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=104634"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=104634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}