[j-nsp] First time using BGP communities

Eric Van Tol eric at atlantech.net
Fri Jul 21 14:53:16 EDT 2006


The reason your community is not getting set is because you are
immediately accepting the route in your first term.  Remove the 'accept'
from 'term sourced-networks'.

An 'accept' action means that the route is just that - accepted.  It can
go through no further policy terms in order to perform actions.

HTH,
evt

-----Original Message-----
From: juniper-nsp-bounces at puck.nether.net
[mailto:juniper-nsp-bounces at puck.nether.net] On Behalf Of Chris Adams
Sent: Friday, July 21, 2006 2:46 PM
To: juniper-nsp at puck.nether.net
Subject: [j-nsp] First time using BGP communities

I'm trying to switch to using BGP communities for some of our filtering
and such, and this is the first time I've used them.  I think I'm
missing something though, because I can't get it working yet.

I am exporting the route okay, but it isn't getting a community set.
Here's an excerpt from my config:

protocols {
    bgp {
        group bhmrouter {
            type internal;
            neighbor 216.180.48.6 {
                description bhmrouter;
                import bgp-ibgp-peers-in;
                export [ bgp-redistributes bgp-ibgp-peers-out ];
                peer-as 6337;
            }
        }
    }
}
policy-options {
    policy-statement bgp-redistributes {
        term sourced-networks {
            from {
                route-filter 216.180.0.0/17 exact;
            }
            then accept;
        }
        term from-bgp {
            from protocol bgp;
            then next policy;
        }
        term deny {
            then reject;
        }
    }
    policy-statement bgp-ibgp-peers-out {
        term next-hop-self {
            then {
                next-hop self;
                next term;
            }
        }
        term tag {
            from protocol static;
            then {
                community set hiwaay-hsv-local;
                next term;
            }
        }
        term accept {
            then accept;
        }
    }
    community hiwaay-hsv-local members 6337:1000;
}
routing-options {
    static {
        route 216.180.0.0/17 {
            discard;
            preference 199;
        }
    }
}


Why isn't 216.180.0.0/17 getting the community 6337:1000 set?

-- 
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
_______________________________________________
juniper-nsp mailing list juniper-nsp at puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp





More information about the juniper-nsp mailing list