Routing

last person joined: yesterday 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  policy prefix

    Posted 03-16-2018 03:37

    Hello,

     

    I am receiving the following prefix on a bgp session , 40.20.100.0/23 and i want to configure a policy to import this route to my own rt  as a /28 . It is possible?   . Is in Junos OS

     

    Thanks

     



  • 2.  RE: policy prefix

    Posted 03-16-2018 03:46
    Can you elaborate this?

    Do you want to change the subnet mask and import it?


  • 3.  RE: policy prefix

    Posted 03-16-2018 03:48

    Yes, i want to change the subnet mask and import it



  • 4.  RE: policy prefix

    Posted 03-16-2018 04:05
    I don’t think you can do this.

    Can you explain why do you want to do this? Any specific reason ?

    You can try to generate a route with the policy but not sure if that will meet your requirement.


  • 5.  RE: policy prefix

    Posted 03-16-2018 04:24

    I need a /28 for manage in my network...

     

    How can i generate a route with the policy ? coul you give me an example ?

     

    Thanks a lot.



  • 6.  RE: policy prefix

    Posted 03-16-2018 05:33

    You can refer to below example for generating the route. However if you receive /24 prefix and generate route with /28 prefix, the route will be hidden as there will be no contributing route learned from the bgp for /28.

    Can you explain how will you manage you network with /28 and when you re receiving the /24 from the upstream peer?


    [edit]
    root@CE4_re# show policy-options
    policy-statement test {
    term 1 {
    from {
    protocol bgp;
    route-filter 150.0.0.10/32 exact;
    }
    then accept;
    }
    term 2 {
    then reject;
    }
    }

    [edit]
    root@CE4_re# show routing-options
    generate {
    route 150.0.0.0/28 {
    policy test;
    full;
    }
    }
    autonomous-system 1000;

    [edit]
    root@CE4_re# run show route 150.0.0.10/32

    inet.0: 18 destinations, 18 routes (18 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    150.0.0.10/32 *[BGP/170] 00:01:57, localpref 100
    AS path: 100 I, validation-state: unverified
    > to 192.168.44.44 via ge-0/0/4.0

    [edit]
    root@CE4_re# run show route 150.0.0.0/28

    inet.0: 18 destinations, 18 routes (18 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    150.0.0.0/28 *[Aggregate/130] 00:00:48
    > to 192.168.44.44 via ge-0/0/4.0
    150.0.0.10/32 *[BGP/170] 00:02:04, localpref 100
    AS path: 100 I, validation-state: unverified
    > to 192.168.44.44 via ge-0/0/4.0

    [edit]
    root@CE4_re#



  • 7.  RE: policy prefix
    Best Answer

    Posted 03-16-2018 12:21

    Hello,

    If You don't have a default route and don't care that You would have both /28 and /23 in Your routing table then this is certainly possible, You need to use a static with NH==broadcast IP of larget subnet (in order that this static does not resolve via itself):

    set routing-options static route 40.20.100.0/28 next-hop 40.20.101.255 resolve

    When You don't have a 0/0 route and have 40.20.100.0/23 then 40.20.100/28' NH will resolve via 40.20.100/23 and You can redistribute it anywhere.

    If You have a 0/0 route then this solution won't work without additional config (You have to deny resolution via 0/0).

    HTH

    Thx
    Alex