{"id":1644,"date":"2025-05-13T23:24:30","date_gmt":"2025-05-13T15:24:30","guid":{"rendered":"http:\/\/113.45.254.23\/?p=1644"},"modified":"2025-05-13T23:24:30","modified_gmt":"2025-05-13T15:24:30","slug":"h3c-ospf%e5%a4%9a%e5%8c%ba%e5%9f%9f","status":"publish","type":"post","link":"http:\/\/113.45.254.23\/?p=1644","title":{"rendered":"h3c ospf\u591a\u533a\u57df"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u5b9e\u9a8c\u62d3\u6251\u56fe<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/05\/image-39-1024x666.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"666\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/05\/image-39-1024x666.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1645\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001R1\u8bbe\u7f6eIP<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;H3C>system-view\nSystem View: return to User View with Ctrl+Z.\n&#91;H3C]undo info-center enable\nInformation center is disabled.\n&#91;H3C]sysname R1\n&#91;R1]interface loopback 0\n&#91;R1-LoopBack0]ip address 1.1.1.1 32\n&#91;R1-LoopBack0]quit\n&#91;R1]interface g 0\/1\n&#91;R1-GigabitEthernet0\/1]ip address 100.3.3.1 24\n&#91;R1-GigabitEthernet0\/1]undo shutdown\n&#91;R1-GigabitEthernet0\/1]quit\n&#91;R1]interface g 0\/0\n&#91;R1-GigabitEthernet0\/0]ip address 100.1.1.1 24\n&#91;R1-GigabitEthernet0\/0]undo shutdown\n&#91;R1-GigabitEthernet0\/0]quit\n&#91;R1]<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001R2\u8bbe\u7f6eIP<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;H3C>system-view\nSystem View: return to User View with Ctrl+Z.\n&#91;H3C]undo info-center enable\nInformation center is disabled.\n&#91;H3C]sysname R2\n&#91;R2]interface loopback 0\n&#91;R2-LoopBack0]ip address 2.2.2.2 32\n&#91;R2-LoopBack0]quit\n&#91;R2]interface g 0\/0\n&#91;R2-GigabitEthernet0\/0]ip address 100.1.1.2 24\n&#91;R2-GigabitEthernet0\/0]undo shutdown\n&#91;R2-GigabitEthernet0\/0]quit\n&#91;R2]interface g 0\/1\n&#91;R2-GigabitEthernet0\/1]ip address 100.2.2.2 24\n&#91;R2-GigabitEthernet0\/1]undo shutdown\n&#91;R2-GigabitEthernet0\/1]quit\n&#91;R2]<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001R3\u8bbe\u7f6eIP<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;H3C>system-view\nSystem View: return to User View with Ctrl+Z.\n&#91;H3C]sysname r3\n&#91;r3]interface loopback 0\n&#91;r3-LoopBack0]ip address 3.3.3.3 32\n&#91;r3-LoopBack0]quit\n&#91;r3]interface g 0\/0\n&#91;r3-GigabitEthernet0\/0]ip address 100.2.2.3 24\n&#91;r3-GigabitEthernet0\/0]undo shutdown\n&#91;r3-GigabitEthernet0\/0]quit\n&#91;r3]interface g 0\/1\n&#91;r3-GigabitEthernet0\/1]ip address 100.4.4.3 24\n&#91;r3-GigabitEthernet0\/1]undo shutdown\n&#91;r3-GigabitEthernet0\/1]quit\n&#91;r3]<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e94\u3001R4\u8bbe\u7f6eIP<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;H3C>system-view\nSystem View: return to User View with Ctrl+Z.\n&#91;H3C]sysname r4\n&#91;r4]undo info-center enable\nInformation center is disabled.\n&#91;r4]interface loopback 0\n&#91;r4-LoopBack0]ip address 4.4.4.4 32\n&#91;r4-LoopBack0]quit\n&#91;r4]interface g 0\/0\n&#91;r4-GigabitEthernet0\/0]ip address 100.3.3.4 24\n&#91;r4-GigabitEthernet0\/0]undo shutdown\n&#91;r4-GigabitEthernet0\/0]quit\n&#91;r4]<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u516d\u3001R5\u8bbe\u7f6eIP<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;H3C>system-view\nSystem View: return to User View with Ctrl+Z.\n&#91;H3C]undo info-center enable\nInformation center is disabled.\n&#91;H3C]sysname r5\n&#91;r5]interface loopback 0\n&#91;r5-LoopBack0]ip address 5.5.5.5 32\n&#91;r5-LoopBack0]quit\n&#91;r5]interface g 0\/0\n&#91;r5-GigabitEthernet0\/0]ip address 100.4.4.5 24\n&#91;r5-GigabitEthernet0\/0]undo shutdown\n&#91;r5-GigabitEthernet0\/0]quit\n&#91;r5]<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e03\u3001R1\u914d\u7f6eOSPF<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;R1]ospf 1 router-id 1.1.1.1 \u4f7f\u7528OSPF\u534f\u8bae\uff0c\u8fdb\u7a0b\u53f7\u662f1\uff0c\u8def\u7531ID\u53f7\u662f1.1.1.1\n&#91;R1-ospf-1]area 0 \u9aa8\u5e72\u533a\u57dfarea0\n&#91;R1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0 \u5ba3\u544a\u7684\u7f51\u6bb5\u662f1.1.1.1 \u53cd\u63a9\u7801\u662f0.0.0.0\n&#91;R1-ospf-1-area-0.0.0.0]network 100.1.1.0 0.0.0.255 \u5ba3\u544a\u7684\u7f51\u6bb5\u662f100.1.1.0 \u53cd\u63a9\u7801\u662f0.0.0.255\n&#91;R1-ospf-1-area-0.0.0.0]quit\n&#91;R1-ospf-1]area 1\n&#91;R1-ospf-1-area-0.0.0.1]network 100.3.3.0 0.0.0.255\n&#91;R1-ospf-1-area-0.0.0.1]quit\n&#91;R1-ospf-1]quit\n&#91;R1]ospf 1 router-id 1.1.1.1\n&#91;R1-ospf-1]area 0\n&#91;R1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0\n&#91;R1-ospf-1-area-0.0.0.0]network 100.1.1.0 0.0.0.255\n&#91;R1-ospf-1-area-0.0.0.0]quit\n&#91;R1-ospf-1]area 1\n&#91;R1-ospf-1-area-0.0.0.1]network 100.3.3.0 0.0.0.255\n&#91;R1-ospf-1-area-0.0.0.1]quit\n&#91;R1-ospf-1]<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u516b\u3001R2\u914d\u7f6eOSPF<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;R2]ospf 1\n&#91;R2-ospf-1]ospf 1 router-id 2.2.2.2\n&#91;R2-ospf-1]area 0\n&#91;R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0\n&#91;R2-ospf-1-area-0.0.0.0]network 100.1.1.0 0.0.0.255\n&#91;R2-ospf-1-area-0.0.0.0]network 100.2.2.0 0.0.0.255\n&#91;R2-ospf-1-area-0.0.0.0]quit\n&#91;R2-ospf-1]<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e5d\u3001R3\u914d\u7f6eOSPF<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;r3]ospf 1 router-id 3.3.3.3\n&#91;r3-ospf-1]area 0\n&#91;r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0\n&#91;r3-ospf-1-area-0.0.0.0]network 100.2.2.0 0.0.0.255\n&#91;r3-ospf-1-area-0.0.0.0]%May 13 14:51:42:194 2025 r3 OSPF\/5\/OSPF_NBR_CHG: OSPF 1 Neighbor 100.2.2.2(GigabitEthernet0\/0) changed from LOADING to FULL.\n\n&#91;r3-ospf-1-area-0.0.0.0]quit\n&#91;r3-ospf-1]area 2\n&#91;r3-ospf-1-area-0.0.0.2]network 100.4.4.0 0.0.0.255\n&#91;r3-ospf-1-area-0.0.0.2]quit<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5341\u3001R4\u914d\u7f6eOSPF<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;r4>system-view\nSystem View: return to User View with Ctrl+Z.\n&#91;r4]ospf 1 router-id 4.4.4.4 \n&#91;r4-ospf-1]area 1\n&#91;r4-ospf-1-area-0.0.0.1]network 4.4.4.4 0.0.0.255\n&#91;r4-ospf-1-area-0.0.0.1]network 100.3.3.0 0.0.0.255\n&#91;r4-ospf-1-area-0.0.0.1]quit\n&#91;r4-ospf-1]<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u4e00\u3001R5\u914d\u7f6eOSPF<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;r5]ospf 1 router-id 5.5.5.5 \u4f7f\u7528OSPF\u534f\u8bae\uff0c\u8fdb\u7a0b\u53f7\u662f1\uff0c\u8def\u7531ID\u53f7\u662f5.5.5.5\n&#91;r5-ospf-1]area 2 \u975e\u9aa8\u5e72\u533a\u57dfarea2\uff08\u9aa8\u5e72\u533a\u57dfarea 0\uff09\n&#91;r5-ospf-1-area-0.0.0.2]network 5.5.5.5 0.0.0.0 \u5ba3\u544a\u7684\u7f51\u6bb5\u662f5.5.5.5 \u53cd\u63a9\u7801\u662f0.0.0.0\n&#91;r5-ospf-1-area-0.0.0.2]network 100.4.4.0 0.0.0.255 \u5ba3\u544a\u7684\u7f51\u6bb5\u662f100.4.4.0 \u53cd\u63a9\u7801\u662f0.0.0.255\n&#91;r5-ospf-1-area-0.0.0.2]quit\n&#91;r5-ospf-1]quit\n&#91;r5]quit<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u4e8c\u3001\u67e5\u770bIP\u8def\u7531\u8868\u4fe1\u606f<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;r5]display ip routing-table  \u67e5\u770bIP\u8def\u7531\u8868\u4fe1\u606f\n\nDestinations : 18       Routes : 18\n\nDestination\/Mask   Proto   Pre Cost        NextHop         Interface\n0.0.0.0\/32         Direct  0   0           127.0.0.1       InLoop0\n1.1.1.1\/32         O_INTER 10  3           100.4.4.3       GE0\/0\n2.2.2.2\/32         O_INTER 10  2           100.4.4.3       GE0\/0\n3.3.3.3\/32         O_INTER 10  1           100.4.4.3       GE0\/0\n4.4.4.4\/32         O_INTER 10  4           100.4.4.3       GE0\/0\n5.5.5.5\/32         Direct  0   0           127.0.0.1       InLoop0\n100.1.1.0\/24       O_INTER 10  3           100.4.4.3       GE0\/0\n100.2.2.0\/24       O_INTER 10  2           100.4.4.3       GE0\/0\n100.3.3.0\/24       O_INTER 10  4           100.4.4.3       GE0\/0\n100.4.4.0\/24       Direct  0   0           100.4.4.5       GE0\/0\n100.4.4.5\/32       Direct  0   0           127.0.0.1       InLoop0\n100.4.4.255\/32     Direct  0   0           100.4.4.5       GE0\/0\n127.0.0.0\/8        Direct  0   0           127.0.0.1       InLoop0\n127.0.0.1\/32       Direct  0   0           127.0.0.1       InLoop0\n127.255.255.255\/32 Direct  0   0           127.0.0.1       InLoop0\n224.0.0.0\/4        Direct  0   0           0.0.0.0         NULL0\n224.0.0.0\/24       Direct  0   0           0.0.0.0         NULL0\n255.255.255.255\/32 Direct  0   0           127.0.0.1       InLoop0\n&#91;r5]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5b9e\u9a8c\u62d3\u6251\u56fe \u4e8c\u3001R1\u8bbe\u7f6eIP \u4e09\u3001R2\u8bbe\u7f6eIP \u56db\u3001R3\u8bbe\u7f6eIP \u4e94\u3001R4\u8bbe\u7f6eIP \u516d\u3001R5\u8bbe\u7f6eIP \u4e03\u3001 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[96],"tags":[108],"class_list":["post-1644","post","type-post","status-publish","format-standard","hentry","category-96","tag-ospf"],"_links":{"self":[{"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/posts\/1644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/113.45.254.23\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1644"}],"version-history":[{"count":1,"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/posts\/1644\/revisions"}],"predecessor-version":[{"id":1646,"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/posts\/1644\/revisions\/1646"}],"wp:attachment":[{"href":"http:\/\/113.45.254.23\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/113.45.254.23\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1644"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/113.45.254.23\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}