{"id":1278,"date":"2021-09-23T10:23:29","date_gmt":"2021-09-23T10:23:29","guid":{"rendered":"http:\/\/www.scubalife.eu\/?page_id=1278"},"modified":"2021-09-23T11:35:46","modified_gmt":"2021-09-23T11:35:46","slug":"routing-ospf","status":"publish","type":"page","link":"https:\/\/www.scubalife.eu\/en\/troche-teorii\/routing-ospf\/","title":{"rendered":"Routing OSPF"},"content":{"rendered":"<div class=\"pntrst_main_before_after\"><\/div><h4>General information and attributes<\/h4>\n<ul>\n<li>Type: Link-State<\/li>\n<li>Algorithm: Dijkstra<\/li>\n<li>Metric: Cost (Bandwidth)<\/li>\n<li>AD: 110<\/li>\n<li>Standard: RFC 2328, 2740<\/li>\n<li>Protocols: IP<\/li>\n<li>Transport: IP\/89<\/li>\n<li>Authentication: Plaintext, MD5<\/li>\n<li>AllSPF Address: 224.0.0.5<\/li>\n<li>AllDR Address: 224.0.0.6<\/li>\n<\/ul>\n<h4>Link State Advertisements (LSA):<\/h4>\n<ul>\n<li>Router Link (Type 1): Lists neighboring routers and the cost to each; flooded within an area<\/li>\n<li>Network Link (Type 2): Generated by a DR; lists all routers on an adjacent segment; flooded within an area<\/li>\n<li>Network Summary (Type 3): Generated by an ABR and advertised among areas<\/li>\n<li>ASBR Summary (Type 4): Injected by an ABR into the backbone to advertise the presence of an ASBR within an area<\/li>\n<li>External Link (Type 5): Generated by an ASBR and flooded throughout the AS to advertise a route external to OSPF<\/li>\n<li>NSSA External Link (Type 7): Generated by an ASBR in a not-so-stubby area; converted into a type 5 LSA by the ABR when leaving the area<\/li>\n<\/ul>\n<h4>Router Types<\/h4>\n<ul>\n<li>Internal Router: All interfaces reside within the same area<\/li>\n<li>Backbone Router: A router with an interface in area 0 (the backbone)<\/li>\n<li>Area Border Router (ABR): Connects two or more areas<\/li>\n<li>AS Boundary Router (ASBR): Connects to additional routing domains; typically located in the backbone<\/li>\n<\/ul>\n<h4>Area Types<\/h4>\n<ul>\n<li><strong>Standard Area<\/strong>: Default OSPF area type<\/li>\n<li><strong>Stub Area<\/strong>: External link (type 5) LSAs are replaced with a default route<\/li>\n<li><strong>Totally Stubby Area<\/strong>: Type 3, 4, and 5 LSAs are replaced with a default route<\/li>\n<li><strong>Not So Stubby Area (NSSA)<\/strong>: A stub area containing an ASBR; type 5 LSAs are converted to type 7 within the area<\/li>\n<\/ul>\n<h4>External Route Types<\/h4>\n<ul>\n<li>E1: cost to the advertising ASBR plus the external cost of the route<\/li>\n<li>E2: (Default) &#8211; cost of the route as seen by the ASBR<\/li>\n<li>metric formula\u00a0 cost = (100.000kbps\/link speed) [modifiable by command:\n<pre>ospf auto-cost reference-bandwidth<\/pre>\n<\/li>\n<\/ul>\n<h4>Troubleshooting<\/h4>\n<pre style=\"padding-left: 40px;\"><span style=\"color: #339966;\">show ip [route | protocols]<\/span>\r\n<span style=\"color: #339966;\">show ip ospf interface<\/span>\r\n<span style=\"color: #339966;\">show ip ospf neighbor<\/span>\r\n<span style=\"color: #339966;\">show ip ospf border-routers<\/span>\r\n<span style=\"color: #339966;\">show ip ospf virtual-links<\/span>\r\n<span style=\"color: #339966;\">debug ip ospf [\u2026]<\/span><\/pre>\n<h4>Configuration examples<\/h4>\n<h5>Diagram<\/h5>\n<p><img decoding=\"async\" class=\"wp-image-1289 alignnone lazyload\" data-src=\"http:\/\/www.scubalife.eu\/wp-content\/uploads\/2021\/09\/ospf01-1.png\" alt=\"\" width=\"569\" height=\"388\" data-srcset=\"https:\/\/www.scubalife.eu\/wp-content\/uploads\/2021\/09\/ospf01-1.png 926w, https:\/\/www.scubalife.eu\/wp-content\/uploads\/2021\/09\/ospf01-1-300x205.png 300w, https:\/\/www.scubalife.eu\/wp-content\/uploads\/2021\/09\/ospf01-1-768x524.png 768w\" data-sizes=\"(max-width: 569px) 100vw, 569px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 569px; --smush-placeholder-aspect-ratio: 569\/388;\" \/><\/p>\n<h5>Router A<\/h5>\n<pre>interface Serial0\/0\r\ndescription WAN Link\r\nip address 172.16.34.2 255.255.255.252\r\n!\r\ninterface FastEthernet0\/0\r\ndescription Area 0\r\nip address 192.168.0.1 255.255.255.0\r\n!\r\ninterface Loopback0\r\n! Used as router ID\r\nip address 10.0.34.1 255.255.255.0\r\n!\r\nrouter ospf 100\r\n! Advertising the WAN cloud to OSPF\r\nredistribute static subnets\r\nnetwork 192.168.0.0 0.0.0.255 area 0\r\n!\r\n! Static route to the WAN cloud\r\nip route 172.16.0.0 255.255.192.0 172.16.34.1<\/pre>\n<h5>Router B<\/h5>\n<pre>interface Ethernet0\/0\r\ndescription Area 0\r\nip address 192.168.0.2 255.255.255.0\r\nip ospf 100 area 0\r\n!\r\ninterface Ethernet0\/1\r\ndescription Area 2\r\nip address 192.168.2.1 255.255.255.0\r\nip ospf 100 area 2\r\n! Optional MD5 authentication configured\r\nip ospf authentication message-digest\r\nip ospf message-digest-key 1 md5 FooBar\r\n! Give B priority in DR election\r\nip ospf priority 100\r\n!\r\ninterface Ethernet0\/2\r\ndescription Area 1\r\nip address 192.168.1.1 255.255.255.0\r\nip ospf 100 area 1\r\n!\r\ninterface Loopback0\r\nip address 10.0.34.2 255.255.255.0\r\n!\r\nrouter ospf 100\r\n! Define area 1 as a stub area\r\narea 1 stub\r\n! Virtual link from area 0 to area 9\r\narea 2 virtual-link 10.0.34.3<\/pre>\n<h5>Router C<\/h5>\n<pre>interface Ethernet0\/0\r\ndescription Area 9\r\nip address 192.168.9.1 255.255.255.0\r\nip ospf 100 area 9\r\n!\r\ninterface Ethernet0\/1\r\ndescription Area 2\r\nip address 192.168.2.2 255.255.255.0\r\nip ospf 100 area 2\r\n! Optional MD5 authentication configured\r\nip ospf authentication message-digest\r\nip ospf message-digest-key 1 md5 FooBar\r\n! Give C second priority (BDR) in election\r\nip ospf priority 50\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\ninterface Loopback0\r\nip address 10.0.34.3 255.255.255.0\r\n!\r\nrouter ospf 100\r\n! Define area 9 as a totally stubby area\r\narea 9 stub no-summary\r\n! Virtual link from area 9 to area 0\r\narea 2 virtual-link 10.0.34.2<\/pre>\n<p>&nbsp;<\/p>\n<div class=\"pntrst_main_before_after\"><\/div><div class=\"fcbkbttn_buttons_block\" id=\"fcbkbttn_left\"><div class=\"fcbkbttn_button\">\n                            <a href=\"https:\/\/www.facebook.com\/scubalife.eu\" target=\"_blank\">\n                                <img decoding=\"async\" data-src=\"https:\/\/www.scubalife.eu\/wp-content\/plugins\/social-buttons-pack\/facebook-button-plugin\/images\/standard-facebook-ico.png\" alt=\"Fb-Button\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 75px; --smush-placeholder-aspect-ratio: 75\/20;\" \/>\n                            <\/a>\n                        <\/div><div class=\"fcbkbttn_like \"><fb:like href=\"https:\/\/www.scubalife.eu\/en\/troche-teorii\/routing-ospf\/\" action=\"like\" colorscheme=\"light\" layout=\"button_count\"  size=\"small\"><\/fb:like><\/div><div class=\"fb-share-button  \" data-href=\"https:\/\/www.scubalife.eu\/en\/troche-teorii\/routing-ospf\/\" data-type=\"button\" data-size=\"small\"><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>General information and attributes Type: Link-State Algorithm: Dijkstra Metric: Cost (Bandwidth) AD: 110 Standard: RFC&#8230;<\/p>\n<div class=\"fcbkbttn_buttons_block\" id=\"fcbkbttn_left\"><div class=\"fcbkbttn_button\">\n                            <a href=\"https:\/\/www.facebook.com\/scubalife.eu\" target=\"_blank\">\n                                <img decoding=\"async\" data-src=\"https:\/\/www.scubalife.eu\/wp-content\/plugins\/social-buttons-pack\/facebook-button-plugin\/images\/standard-facebook-ico.png\" alt=\"Fb-Button\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 75px; --smush-placeholder-aspect-ratio: 75\/20;\" \/>\n                            <\/a>\n                        <\/div><div class=\"fcbkbttn_like \"><fb:like href=\"https:\/\/www.scubalife.eu\/en\/troche-teorii\/routing-ospf\/\" action=\"like\" colorscheme=\"light\" layout=\"button_count\"  size=\"small\"><\/fb:like><\/div><div class=\"fb-share-button  \" data-href=\"https:\/\/www.scubalife.eu\/en\/troche-teorii\/routing-ospf\/\" data-type=\"button\" data-size=\"small\"><\/div><\/div>","protected":false},"author":2,"featured_media":1295,"parent":559,"menu_order":6,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1278","page","type-page","status-publish","has-post-thumbnail","hentry"],"psp_head":"<title>Routing OSPF &ndash; [:pl]Scubalife.EU[:]<\/title>\r\n<meta name=\"description\" content=\"General information and attributes Type: Link-State Algorithm: Dijkstra Metric: Cost (Bandwidth) AD: 110 Standard: RFC 2328, 2740 Protocols: IP Transport: IP\/89 Authentication: Plaintext, MD5 AllSPF Address: 224.\" \/>\r\n<meta name=\"robots\" content=\"index,follow\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/www.scubalife.eu\/en\/troche-teorii\/routing-ospf\/\" \/>\r\n","_links":{"self":[{"href":"https:\/\/www.scubalife.eu\/en\/wp-json\/wp\/v2\/pages\/1278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scubalife.eu\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.scubalife.eu\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.scubalife.eu\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scubalife.eu\/en\/wp-json\/wp\/v2\/comments?post=1278"}],"version-history":[{"count":9,"href":"https:\/\/www.scubalife.eu\/en\/wp-json\/wp\/v2\/pages\/1278\/revisions"}],"predecessor-version":[{"id":1294,"href":"https:\/\/www.scubalife.eu\/en\/wp-json\/wp\/v2\/pages\/1278\/revisions\/1294"}],"up":[{"embeddable":true,"href":"https:\/\/www.scubalife.eu\/en\/wp-json\/wp\/v2\/pages\/559"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scubalife.eu\/en\/wp-json\/wp\/v2\/media\/1295"}],"wp:attachment":[{"href":"https:\/\/www.scubalife.eu\/en\/wp-json\/wp\/v2\/media?parent=1278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}