You need to configure aggregate routes. It's not clear what version of JunOS you're running, but it is covered in the JunOS routing guide
[edit] routing-options { rib **routing-table-name** { aggregate { defaults { **aggregate-options**; } route **destination-prefix** { policy **policy-name**; **aggregate-options**; } } } }