0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

JUNOS BGPでIPv6を広告するときにつまづいた話

Posted at

同一グループ内でIPv4とIPv6のピアを設定しているときに、exportポリシーを設定する位置によって経路が広告されたりされなかったりしたから記録に残しておく。

つまづいた点

以下のコンフィグのようにグループ全体にIPv4とIPv6用のexportポリシーを設定してもIPv4の経路は広告されるがIPv6の経路は広告されなかった。

group EXAMPLE {
    type external;
    import [ IMPORT-EXAMPLE-V4 IMPORT-EXAMPLE-V6 ];
    export [ EXPORT-V4 EXPORT-V6 ];
    peer-as 65000;
    neighbor 192.0.2.1 {
        family inet {
            unicast {
                prefix-limit {
                    maximum 2000000;
                    teardown 90 idle-timeout 60;
                }
            }
        }
    }
    
    neighbor 2001:db8::1 {
        family inet6 {
            unicast {
                prefix-limit {
                    maximum 1000000;
                    teardown 90 idle-timeout 60;
                }
            }                           
        }
    }

policy-statement EXPORT-V4 {
    term export-v4 {
        from {
            prefix-list OUR-PREFIXES-V4;
        }
        then accept;
    }
    then reject;
}
policy-statement EXPORT-V6 {
    term export-v6 {
        from {
            prefix-list OUR-PREFIXES-V6;
        }
        then accept;                    
    }
    then reject;
}

対応策

以下のようにピアごとにexportポリシーを設定してあげればIPv6の経路も広告された。

neighbor 2001:db8::1 {
    family inet6 {
        unicast {
            prefix-limit {
                maximum 1000000;
                teardown 90 idle-timeout 60;
            }
        }
    }                                   
    export EXPORT-V6;
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?