[j-nsp] Cisco advertise-map in juniper

Vladimir S. Blazhkun v.blazhkun at pcs-net.net
Fri Sep 15 13:50:37 EDT 2006


> IOS have 'advertise-map/non-exist-map' to control which routes to be
> advertsed if some other routes not available. Is there any way Junos
> can do that?

Sure, use aggregated/generated routes with some policies.

Example (search this list for more):

protocols bgp {
     group ebgp {
 	type external;
 	neighbor 10.1.0.1 {
 	    description primary;
 	    export announce-conditional-generate;
 	    peer-as 10;
 	}
 	neighbor 20.1.0.1 {
 	    description backup;
 	    export announce-conditional-aggregate;
 	    peer-as 20;
 	}
    }
}

routing-options {
     aggregate {
 	route 192.168.0.0/16 {
 	    policy check-contributing-routes;
 	    discard;
 	}
     }
     generate {
 	route 192.168.0.0/16 {
 	    policy check-contributing-routes-2;
 	    discard;
 	}
     }
     static {
 	route 192.168.0.0/32 {
 	    next-hop 10.1.0.2;
 	    qualified-next-hop 20.1.0.2 {
 		preference 6;
 	    }
 	    resolve;
 	}
     }
}

policy-options {
     policy-statement announce-conditional-generate {
 	term 1 {
 	    from {
 		protocol aggregate;
 		route-filter 192.168.0.0/16 exact;
 	    }
 	    then accept;
 	}
 	term 2 {
 	    then reject;
 	}
     }
     policy-statement announce-conditional-aggregate {
 	term 1 {
 	    from {
 		protocol aggregate;
 		route-filter 192.168.0.0/16 exact;
 	    }
 	    then accept;
 	}
 	term 2 {
 	    then reject;
 	}
     }
     policy-statement check-contributing-routes {
 	term 1 {
 	    from {
 		protocol static;
 		route-filter 192.168.0.0/32 exact;
 		preference 6;
 	    }
 	    then accept;
 	}
 	term 2 {
 	    then reject;
 	}
     }
     policy-statement check-contributing-routes-2 {
 	term 1 {
 	    from {
 		protocol static;
 		route-filter 192.168.0.0/32 exact;
 		preference 5;
 	    }
 	    then accept;
 	}
 	term 2 {
 	    then reject;
 	}
     }
}

-- 
Vladimir S. Blazhkun,
JNSS-M JNCIA-M #773 JNCIS-M #1100 JNCIP-M #289 JNCI-M
JNCIA-J JNCI-J


More information about the juniper-nsp mailing list