[j-nsp] Is is possible to export prefixes which are not in inet.0?

Hannes Gredler hannes at juniper.net
Thu Oct 6 10:06:59 EDT 2005



Dmitri.Skachkov at nominet.org.uk wrote:
> This is not exactly what I want to achieve. As I understand it with 
> communities I still have to
> put the same prefix in two places on J2300 (routes distributor): in static 
> routing table and
> in the policy for specific neighbor. Right?

wrong - you match then against the community and not the prefix;

> I want to minimize configuration changes and avoid duplicating the same 
> pefixes in different places.

thats what community based tagging schemes are for;

> Hannes Gredler <hannes at juniper.net> wrote on 04/10/2005 19:02:35:
> 
> 
>>why don't you define a blackhole community e.g. your-as:666
>>then every border router in your AS is configured such that
>>upon receipt of a route with this community
>>it rewrites the next-hop pointing to a
>>local discard interface on every router;
>>
>>then you simply have to attach the community from your route
>>server and traffic at the ASBR;
>>
>>/hannes
>>
>>dmitri at nominet.org.uk wrote:
>>
>>>Hi,
>>>
>>>I'm setting up a J2300 router as distributor of bogon routes to all 
> 
> our 
> 
>>>routers through private peering.
>>>I am able to do this as in normal BGP peering, i.e. I can export 
> 
> routes 
> 
>>>which are in inet.0 rib. For this
>>>I have to setup static routes in the default (inet.0) rib and then 
> 
> specify 
> 
>>>in a policy which prefixes I want
>>>to export.
>>>Now if I want to block some prefix on a particular router, on J2300 I 
> 
> have 
> 
>>>to setup this prefix
>>>as static route and in export policy for this peer (router) to 
> 
> actually 
> 
>>>export it. I.e. I heve to specify the
>>>same prefix in 2 places which may leave to errors.
>>>I tried create separe ribs for every peer and then export everything 
> 
> in 
> 
>>>each of this ribs to corresponding
>>>peers. It didn't work. Below is the example of how I tried to do this 
> 
> on 
> 
>>>J2300:
>>>
>>>routing-options {
>>>    rib inet.127 {
>>>        static {
>>>            ...
>>>            route 5.0.0.0/8 discard;
>>>            ...
>>>        }
>>>    }
>>>....
>>>}
>>>protocols {
>>>    bgp {
>>>...
>>>        group TEST {
>>>            type external;
>>>            description "Test peering";
>>>            multihop {
>>>                ttl 255;
>>>            }
>>>            export iana-reserved;
>>>            peer-as 65002;
>>>            neighbor 10.0.0.1;
>>>            }
>>>        }
>>>    }
>>>}
>>>policy-options {
>>>        policy-statement iana-reserved {
>>>        term 1 {
>>>            from {
>>>                rib inet.127;
>>>            }
>>>            then accept;
>>>        }
>>>        term 2 {
>>>            then reject;
>>>        }
>>>    }
>>>}
>>>
>>>#show route table inet.127
>>>inet.127: 7 destinations, 7 routes (6 active, 0 holddown, 1 hidden)
>>>+ = Active Route, - = Last Active, * = Both
>>>
>>>....
>>>5.0.0.0/8          *[Static/5] 3d 03:02:25
>>>                      Discard
>>>...
>>>
>>>#show route advertising-protocol bgp 10.0.0.1 all
>>>
>>>#
>>>
>>>So it doesn't advertise anything.
>>>What am I doing wrong? Or are there ways to achieve the same expected 
>>>results?
>>>
>>>Thank you
>>>Dmitri
>>>_______________________________________________
>>>juniper-nsp mailing list juniper-nsp at puck.nether.net
>>>http://puck.nether.net/mailman/listinfo/juniper-nsp


More information about the juniper-nsp mailing list