{"id":1710,"date":"2025-12-01T13:37:48","date_gmt":"2025-12-01T04:37:48","guid":{"rendered":"https:\/\/mylifeisbeautiful555.net\/?page_id=1710"},"modified":"2025-12-01T13:37:48","modified_gmt":"2025-12-01T04:37:48","slug":"%e3%82%a2%e3%83%88%e3%83%aa%e3%83%93%e3%83%a5%e3%83%bc%e3%83%88%e5%85%a8%e8%a8%ad%e5%ae%9ajuniper%e3%81%ae%e3%82%b1%e3%83%bc%e3%82%b9","status":"publish","type":"page","link":"https:\/\/mylifeisbeautiful555.net\/?page_id=1710","title":{"rendered":"\u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u5168\u8a2d\u5b9a(juniper\u306e\u30b1\u30fc\u30b9)"},"content":{"rendered":"\n<p><strong>BGP \u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u5225\u306b\u3001Juniper\uff08Junos\uff09\u3067\u3069\u3046\u8a2d\u5b9a\u3059\u308b\u304b<\/strong> \u3092\u307e\u3068\u3081\u307e\u3059\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">BGP \u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u306e Juniper \u8a2d\u5b9a\u4e00\u89a7\uff08\u6982\u8981\uff09<\/h1>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u5c5e\u6027<\/th><th>\u5f79\u5272<\/th><th>Juniper \u306e\u8a2d\u5b9a\u65b9\u6cd5<\/th><\/tr><\/thead><tbody><tr><td><strong>Local Preference<\/strong><\/td><td>AS \u5185\u306e\u51fa\u53e3\u9078\u629e<\/td><td><code>set policy-options policy-statement ... then local-preference xx<\/code><\/td><\/tr><tr><td><strong>MED\uff08Multi Exit Disc\uff09<\/strong><\/td><td>\u96a3\u63a5 AS \u306b\u5bfe\u3057\u7d4c\u8def\u512a\u5148\u5ea6\u3092\u63d0\u793a<\/td><td><code>set policy-options policy-statement ... then metric xx<\/code><\/td><\/tr><tr><td><strong>AS-PATH<\/strong><\/td><td>\u7d4c\u8def\u306e\u901a\u904e AS \u306e\u4e00\u89a7<\/td><td><code>set policy-options as-path ...<\/code> \u306b\u3088\u308b\u30de\u30c3\u30c1\u3068 <code>then as-path-prepend<\/code> \u3067\u64cd\u4f5c<\/td><\/tr><tr><td><strong>Weight\uff08Cisco\u7279\u6709\uff09<\/strong><\/td><td>Juniper \u306b\u306f\u7121\u3057<\/td><td>Juniper\u3067\u306f local-preference \u3067\u4ee3\u66ff<\/td><\/tr><tr><td><strong>Origin<\/strong><\/td><td>IGP\/EGP\/Incomplete<\/td><td>Junos \u3067\u306f\u660e\u793a\u8a2d\u5b9a\u4e0d\u53ef\uff08\u518d\u914d\u5e03\u7d4c\u8def\u306e\u6271\u3044\u3067\u6c7a\u307e\u308b\uff09<\/td><\/tr><tr><td><strong>Community<\/strong><\/td><td>\u5c5e\u6027\u30bf\u30b0\u4ed8\u3051<\/td><td><code>set policy-options policy-statement ... then community add ...<\/code><\/td><\/tr><tr><td><strong>Extended Community \/ RT<\/strong><\/td><td>VPNv4\/EVPN\u306a\u3069<\/td><td>VRF \u3067 <code>route-target<\/code> \u3092\u8a2d\u5b9a<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">\u3053\u3053\u304b\u3089\u8a73\u7d30\u8a2d\u5b9a\u4f8b<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">1. <strong>Local Preference\uff08\u30ed\u30fc\u30ab\u30eb\u30d7\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\uff09<\/strong><\/h1>\n\n\n\n<h3 class=\"wp-block-heading\">&#x25b6; \u76ee\u7684<\/h3>\n\n\n\n<p>AS \u5185\u3067 <strong>\u51fa\u53e3\u30eb\u30fc\u30bf\u306e\u512a\u5148\u5ea6\u3092\u6c7a\u3081\u308b<\/strong>\uff08\u5024\u304c\u5927\u304d\u3044\u65b9\u304c\u512a\u5148\uff09\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">&#x2714; \u8a2d\u5b9a\u4f8b\uff08\u53d7\u4fe1\u7d4c\u8def\u306b LocalPref \u3092\u4ed8\u3051\u308b\uff09<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>set policy-options policy-statement SET-LP term 1 from neighbor 10.1.1.1\nset policy-options policy-statement SET-LP term 1 then local-preference 200\nset policy-options policy-statement SET-LP then accept\n\nset protocols bgp group EBGP import SET-LP<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">2. <strong>MED\uff08Metric\uff09<\/strong><\/h1>\n\n\n\n<h3 class=\"wp-block-heading\">&#x25b6; \u76ee\u7684<\/h3>\n\n\n\n<p>\u96a3\u63a5 AS \u306b\u5bfe\u3057\u3066\u3001\u300c\u3053\u306e\u51fa\u53e3\u304b\u3089\u5165\u3063\u3066\u304d\u3066\u307b\u3057\u3044\u300d\u3068\u3044\u3046\u512a\u5148\u5ea6\u3092\u63d0\u793a\u3059\u308b<br>\uff08\u5024\u304c\u5c0f\u3055\u3044\u65b9\u304c\u512a\u5148\uff09<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">&#x2714; \u8a2d\u5b9a\u4f8b\uff08\u5e83\u544a\u3059\u308b\u7d4c\u8def\u306e MED \u3092\u5909\u66f4\uff09<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>set policy-options policy-statement SET-MED term 1 then metric 50\nset policy-options policy-statement SET-MED then accept\n\nset protocols bgp group EBGP export SET-MED<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">3. <strong>AS-PATH\uff08\u30d7\u30ea\u30da\u30f3\u30c9\u306a\u3069\uff09<\/strong><\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">&#x2714; AS-PATH \u3092\u30de\u30c3\u30c1\u3055\u305b\u308b<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>set policy-options as-path TRANSIT \"65001 .*\"\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">&#x2714; AS-PATH \u30d7\u30ea\u30da\u30f3\u30c9\uff08\u81eaAS\u3092\u91cd\u306d\u308b\uff09<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>set policy-options policy-statement PREPEND term 1 from route-filter 0.0.0.0\/0 exact\nset policy-options policy-statement PREPEND term 1 then as-path-prepend \"65010 65010 65010\"\nset policy-options policy-statement PREPEND then accept\n\nset protocols bgp group EBGP export PREPEND<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">4. <strong>Community<\/strong><\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">&#x2714; Community \u306e\u5b9a\u7fa9<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>set policy-options community BLACKHOLE members 65535:666\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">&#x2714; Community \u3092\u4ed8\u4e0e\uff08\u4f8b\u3048\u3070 Blackhole\uff09<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>set policy-options policy-statement ADD-COM term 1 from route-filter 192.168.0.0\/24 exact\nset policy-options policy-statement ADD-COM term 1 then community add BLACKHOLE\nset policy-options policy-statement ADD-COM then accept\n\nset protocols bgp group EBGP export ADD-COM<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">5. <strong>Origin\uff08IGP \/ EGP \/ Incomplete\uff09<\/strong><\/h1>\n\n\n\n<p>Juniper \u3067\u306f <strong>Cisco \u306e\u3088\u3046\u306b\u660e\u793a\u7684\u306b origin \u3092\u8a2d\u5b9a\u3067\u304d\u306a\u3044<\/strong>\u3002<br>origin \u306f\u6b21\u306e\u3088\u3046\u306b\u6c7a\u307e\u308b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7d4c\u8def\u306e\u7a2e\u985e<\/th><th>Origin<\/th><\/tr><\/thead><tbody><tr><td>network \u3082\u3057\u304f\u306f IF \u76f4\u7d50\u6271\u3044<\/td><td><strong>IGP<\/strong><\/td><\/tr><tr><td>aggregate\uff08aggregate route\uff09<\/td><td><strong>IGP<\/strong><\/td><\/tr><tr><td>\u518d\u914d\u5e03\uff08static, connected, ospf, etc\uff09<\/td><td><strong>incomplete<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u305f\u3060\u3057 policy \u3067 rewrite\uff08\u5909\u66f4\uff09\u3059\u308b\u3053\u3068\u306f\u4e0d\u53ef\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">6. <strong>NEXT HOP\uff08\u6b21\u30db\u30c3\u30d7\uff09<\/strong><\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">&#x2714; NEXT-HOP \u5c5e\u6027\u306e\u5909\u66f4<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>set policy-options policy-statement NEXT-HOP-SET term 1 then next-hop 10.10.10.1\nset policy-options policy-statement NEXT-HOP-SET then accept\n\nset protocols bgp group EBGP export NEXT-HOP-SET\n<\/code><\/pre>\n\n\n\n<p>eBGP \u2192 iBGP \u518d\u914d\u5e03\u6642\u306a\u3069\u306b\u3088\u304f\u4f7f\u3046\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">7. <strong>Extended Community\uff08Route Target\uff09<\/strong><\/h1>\n\n\n\n<h3 class=\"wp-block-heading\">&#x25b6; VRF \/ L3VPN \u3067\u5229\u7528<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>set routing-instances VRF-A instance-type vrf\nset routing-instances VRF-A interface ge-0\/0\/0.100\nset routing-instances VRF-A route-distinguisher 65010:10\nset routing-instances VRF-A vrf-target import 65010:100\nset routing-instances VRF-A vrf-target export 65010:100<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">8. <strong>\u3059\u3079\u3066\u306e\u4e3b\u8981\u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u3092\u4f7f\u3063\u305f\u5b9f\u4f8b<\/strong><\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>set policy-options community PREF-HIGH members 65010:10\n\nset policy-options policy-statement FULL-POLICY term 1 from route-filter 10.10.0.0\/16 orlonger\nset policy-options policy-statement FULL-POLICY term 1 then {\n    local-preference 200;\n    metric 50;\n    community add PREF-HIGH;\n    as-path-prepend \"65010 65010\";\n    next-hop 192.168.100.1;\n}\nset policy-options policy-statement FULL-POLICY then accept\n\nset protocols bgp group EBGP export FULL-POLICY<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>BGP \u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u5225\u306b\u3001Juniper\uff08Junos\uff09\u3067\u3069\u3046\u8a2d\u5b9a\u3059\u308b\u304b \u3092\u307e\u3068\u3081\u307e\u3059\u3002 BGP \u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u306e Juniper \u8a2d\u5b9a\u4e00\u89a7\uff08\u6982\u8981\uff09 \u5c5e\u6027 \u5f79\u5272 Juniper \u306e\u8a2d\u5b9a\u65b9\u6cd5 Local Preferenc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1710","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mylifeisbeautiful555.net\/index.php?rest_route=\/wp\/v2\/pages\/1710","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mylifeisbeautiful555.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mylifeisbeautiful555.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mylifeisbeautiful555.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mylifeisbeautiful555.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1710"}],"version-history":[{"count":1,"href":"https:\/\/mylifeisbeautiful555.net\/index.php?rest_route=\/wp\/v2\/pages\/1710\/revisions"}],"predecessor-version":[{"id":1712,"href":"https:\/\/mylifeisbeautiful555.net\/index.php?rest_route=\/wp\/v2\/pages\/1710\/revisions\/1712"}],"wp:attachment":[{"href":"https:\/\/mylifeisbeautiful555.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1710"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}