[j-nsp] cisco "network" command equivalent

Chuck Anderson cra at WPI.EDU
Wed Nov 26 11:18:51 EST 2008


On Wed, Nov 26, 2008 at 08:04:30AM -0800, Maurice Gil Cruz wrote:
> I just would like to know the equivalent of the cisco command 
>     "network <ip> mask <mask>" 
> in juniper. If there is none, I would like to know as to how junos is able to advertise the routes without declaring the networks/unicast addresses to be advertised.

First create an aggregate or static reject route to represent your 
network:

[edit routing-options static]
route <ip>/<mask> {
    reject;
}

OR:

[edit routing-options aggregate]
route <ip>/<mask>;

Then create a policy to accept your route(s):

[edit policy-options policy-statement ORIGINATE]
term ORIGINATE {
    from {
        protocol [ static aggregate ];
        route-filter <ip>/<mask> exact;
    }
    then accept;
}
term REJECT {
    then reject;
}

and apply it to BGP:

[edit protocols bgp group EBGP]
export ORIGINATE;


More information about the juniper-nsp mailing list