{"id":177,"date":"2025-01-18T00:06:37","date_gmt":"2025-01-17T16:06:37","guid":{"rendered":"https:\/\/0x0.pub\/?p=177"},"modified":"2025-08-05T19:43:04","modified_gmt":"2025-08-05T11:43:04","slug":"mpls-vpn-%e5%9f%ba%e7%a1%80%e5%ae%9e%e9%aa%8c","status":"publish","type":"post","link":"https:\/\/0x0.pub\/?p=177","title":{"rendered":"MPLS VPN \u57fa\u7840\u5b9e\u9a8c"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p class=\"has-small-font-size\">\u5b9e\u9a8c\u62d3\u6251<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1131\" height=\"339\" src=\"https:\/\/0x0.pub\/wp-content\/uploads\/2025\/01\/image-2.png\" alt=\"\" class=\"wp-image-178\" srcset=\"https:\/\/0x0.pub\/wp-content\/uploads\/2025\/01\/image-2.png 1131w, https:\/\/0x0.pub\/wp-content\/uploads\/2025\/01\/image-2-300x90.png 300w, https:\/\/0x0.pub\/wp-content\/uploads\/2025\/01\/image-2-768x230.png 768w\" sizes=\"auto, (max-width: 1131px) 100vw, 1131px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted has-small-font-size\">AS200\u9aa8\u5e72\u7f51 ISIS+MPLS\uff0cPE2 PE4 VPNv4\u90bb\u5c45\u5173\u7cfb\u3002\nAS100 CE1\u4e0ePE2 EBGP\uff0cAS300 CE5\u4e0ePE4 EBGP\u3002\n\u5b9e\u73b0CE1 1.1.1.1\/32\u4e0eCE5 5.5.5.5\/32\u79c1\u7f51\u5730\u5740\u901a\u8fc7MPLS VPN\u4f20\u9012\u8def\u7531\u548c\u901a\u4fe1\u3002\n<\/pre>\n\n\n\n<p><strong>R1\u914d\u7f6e<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#\u914d\u7f6e\u63a5\u53e3IP\u548c\u8bbe\u5907\u540d\nsystem-view\nsysname R1\nint g0\/0\/0\nip addr 12.1.1.1 24\nint lo0\nip addr 1.1.1.1 32\n\n#\u914d\u7f6eBGP\u548c\u53d1\u5e03\u73af\u56de\u53e3IP\nbgp 100\nrouter-id 1.1.1.1\npeer 12.1.1.2 as 200\nnetwork 1.1.1.1 32<\/code><\/pre>\n\n\n\n<p><strong>R2\u914d\u7f6e<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#\u914d\u7f6e\u8bbe\u5907\u540d\nsystem-view\nsysname R2\n\n#\u521b\u5efaVPN\u5b9e\u4f8b\u914d\u7f6eRD\/RT\nip vpn-instance 1\nipv4-family\nroute-distinguisher 1:1\nvpn-target 1:5 export-extcommunity\nvpn-target 5:1 import-extcommunity\n\n#\u914d\u7f6e\u63a5\u53e3IP\uff0cCE\u4fa7\u63a5\u53e3\u7ed1\u5b9a\u5b9e\u4f8b1\nint g0\/0\/0\nip bind vpn-instance 1\nip addr 12.1.1.2 24\nint g0\/0\/1\nip addr 12.1.1.2 24\nint lo0\nip addr 2.2.2.2 32\n\n#\u914d\u7f6e\u9aa8\u5e72\u7f51IS-IS\u534f\u8bae\u63a5\u53e3\u542f\u7528\nisis 1\nis-level level-2\nnetwork-entity 49.0001.0000.0000.0001.00\nint g0\/0\/1\nisis en 1\nint lo0\nisis en 1\n\n#\u914d\u7f6eMPLS\u534f\u8bae\u548c\u63a5\u53e3\u542f\u7528\nmpls lsr-id 2.2.2.2\nmpls\nmpls ldp\nint g0\/0\/1\nmpls\nmpls ldp\n\n#\u914d\u7f6eBGP PE2&amp;CE1\u90bb\u5c45\uff0c PE2&amp;PE4 vpnv4\u90bb\u5c45\nbgp 200\nrouter-id 2.2.2.2\nundo default ipv4-unicast\npeer 4.4.4.4 as 200\npeer 4.4.4.4 conn lo0\n\nipv4-family vpn-instance 1 \npeer 12.1.1.1 as-number 100\n\nipv4-family vpnv4\npeer 4.4.4.4 enable\n<\/code><\/pre>\n\n\n\n<p><strong>R3\u914d\u7f6e<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#\u914d\u7f6e\u8bbe\u5907\u540d\nsystem-view\nsysname R3\n\n#\u914d\u7f6e\u63a5\u53e3IP\nint g0\/0\/0\nip addr 23.1.1.3 24\nint g0\/0\/1\nip addr 34.1.1.3 24\nint lo0\nip addr 3.3.3.3 32\n\n#\u914d\u7f6e\u9aa8\u5e72\u7f51IS-IS\u534f\u8bae\u548c\u63a5\u53e3\u542f\u7528\nisis 1\nis-level level-2\nnetwork-entity 49.0002.0000.0000.0002.00\nint g0\/0\/0\nisis en 1\nint g0\/0\/1\nisis en 1\nint lo0\nisis en 1\n\n#\u914d\u7f6eMPLS\u534f\u8bae\u548c\u63a5\u53e3\u542f\u7528\nmpls lsr-id 3.3.3.3\nmpls\nmpls ldp\nint g0\/0\/0\nmpls\nmpls ldp\nint g\/0\/1\nmpls\nmpls ldp<\/code><\/pre>\n\n\n\n<p><strong>R4\u914d\u7f6e<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#\u914d\u7f6e\u8bbe\u5907\u540d\nsystem-view\nsysname R4\n\n#\u521b\u5efaVPN\u5b9e\u4f8b\u914d\u7f6eRD\/RT\nip vpn-instance 1\nipv4-family\nroute-distinguisher 5:5\nvpn-target 5:1 export-extcommunity\nvpn-target 1:5 import-extcommunity\n\n#\u914d\u7f6e\u63a5\u53e3IP\uff0cCE\u4fa7\u63a5\u53e3\u7ed1\u5b9a\u5b9e\u4f8b1\nint g0\/0\/0\nip addr 34.1.1.4 24\nint g0\/0\/1\nip bind vpn-instance 1\nip addr 45.1.1.4 24\nint lo0\nip addr 4.4.4.4 32\n\n#\u914d\u7f6e\u9aa8\u5e72\u7f51IS-IS\u534f\u8bae\u63a5\u53e3\u542f\u7528\nisis 1\nis-level level-2\nnetwork-entity 49.0003.0000.0000.0003.00\nint g0\/0\/0\nisis en 1\nint lo0\nisis en 1\n\n#\u914d\u7f6eMPLS\u534f\u8bae\u548c\u63a5\u53e3\u542f\u7528\nmpls lsr-id 4.4.4.4\nmpls\nmpls ldp\nint g0\/0\/0\nmpls\nmpls ldp\n\n#\u914d\u7f6eBGP PE4&amp;CE5\u90bb\u5c45\uff0c PE4&amp;PE2 vpnv4\u90bb\u5c45\nbgp 200\nrouter-id 4.4.4.4\nundo default ipv4-unicast\npeer 2.2.2.2 as 200\npeer 2.2.2.2 conn lo0\n\nipv4-family vpn-instance 1 \npeer 45.1.1.5 as-number 300\n\nipv4-family vpnv4\npeer 2.2.2.2 enable<\/code><\/pre>\n\n\n\n<p><strong>R5\u914d\u7f6e<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#\u914d\u7f6e\u63a5\u53e3IP\u548c\u8bbe\u5907\u540d\nsystem-view\nsysname R5\nint g0\/0\/0\nip addr 45.1.1.5 24\nint lo0\nip addr 5.5.5.5 32\n\n#\u914d\u7f6eBGP\u548c\u53d1\u5e03\u73af\u56de\u53e3IP\nbgp 300\nrouter-id 5.5.5.5\npeer 45.1.1.4 as 200\nnetwork 5.5.5.5 32<\/code><\/pre>\n\n\n\n<p>\u5b9e\u9a8c\u9a8c\u8bc1<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"795\" height=\"530\" src=\"https:\/\/0x0.pub\/wp-content\/uploads\/2025\/01\/image-3.png\" alt=\"\" class=\"wp-image-180\" srcset=\"https:\/\/0x0.pub\/wp-content\/uploads\/2025\/01\/image-3.png 795w, https:\/\/0x0.pub\/wp-content\/uploads\/2025\/01\/image-3-300x200.png 300w, https:\/\/0x0.pub\/wp-content\/uploads\/2025\/01\/image-3-768x512.png 768w\" sizes=\"auto, (max-width: 795px) 100vw, 795px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u5b9e\u9a8c\u62d3\u6251 AS200\u9aa8\u5e72\u7f51 ISIS+MPLS\uff0cPE2 PE4 VPNv4\u90bb\u5c45\u5173\u7cfb\u3002 AS100 CE1\u4e0ePE [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[36,35],"class_list":["post-177","post","type-post","status-publish","format-standard","hentry","category-ensp","tag-mp-bgp","tag-mpls-vpn"],"_links":{"self":[{"href":"https:\/\/0x0.pub\/index.php?rest_route=\/wp\/v2\/posts\/177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/0x0.pub\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/0x0.pub\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/0x0.pub\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/0x0.pub\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=177"}],"version-history":[{"count":7,"href":"https:\/\/0x0.pub\/index.php?rest_route=\/wp\/v2\/posts\/177\/revisions"}],"predecessor-version":[{"id":322,"href":"https:\/\/0x0.pub\/index.php?rest_route=\/wp\/v2\/posts\/177\/revisions\/322"}],"wp:attachment":[{"href":"https:\/\/0x0.pub\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/0x0.pub\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/0x0.pub\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}