FW: [j-nsp] BGP route origination with communities

Mark Johnson juniper-nsp at avensys.net
Mon Aug 16 08:51:53 EDT 2004


Thanks to the two suggestions with this. I'm getting closer but don't
think I've quite got the hang yet as my originated routes aren't being
advertised out.

What am I missing (apart from clue)?


routing-options {
    static {
        route 192.168.224.0/19 discard;
    }
    autonomous-system 1234;
}


protocols {
    bgp {
        group PEER1 {
            type external;
            damping;
            import [ bgp-policies-PEER1-import graded-flap-damping ];
            family inet {
                any {
                    prefix-limit {
                        maximum 6000;
                        teardown 80 idle-timeout 60;
                    }
                }
            }
            export [ set-local-community bgp-policies-PEER1-export ];
        }
    }
}

policy-options {
    policy-statement set-local-community {
        term 1 {
            from {
                route-filter 192.168.224.0/19 exact;
            }
            then {
                community set community-80;
                community add community-18;
            }
        }
    }
    policy-statement bgp-policies-PEER1-export {
        term term-1 {
            from policy ( ! rm-PEER1OUT );
            then reject;
        }
        /* IOS defaults to NOT sending communities, unlike JUNOS */
        term strip-communities {
            then {
                community delete all;
                next term;
            }
        }
        term next-hop-self {
            then {
                next-hop self;
                next term;
            }
        }
        term explicit-default-action {
            then next policy;
        }
    }
    policy-statement rm-PEER1OUT {
        term term-1 {
            from policy cl-75;
            then {
                metric 999999;
                as-path-prepend 1234;
                accept;
            }
        }
        term term-2 {
            from policy [ cl-80 cl-69 ];
            then {
                metric 999999;
                as-path-prepend 1234;
                accept;
            }
        }
        term term-3 {
            from policy [ cl-81 cl-70 ];
            then {
                metric 999999;
                as-path-prepend "1234 1234 1234";
                accept;
            }
        }
        term ios-implicit-deny {
            then reject;
        }
    }
    policy-statement cl-18 {
        term term-1 {
            from community community-18;
            then accept;
        }
        term ios-implicit-deny {
            then reject;
        }
    }
    policy-statement cl-80 {
        term term-1 {
            from community community-80;
            then accept;
        }
        term ios-implicit-deny {
            then reject;
        }
    }
}



More information about the juniper-nsp mailing list