Routing

Expand all | Collapse all

difference between prefix-limit and accepted-prefix-limit

Jump to Best Answer
  • 1.  difference between prefix-limit and accepted-prefix-limit

    Posted 08-23-2017 07:50

    Hi All,

     

    I am getting confused in understand the difference between the 2 options:

    - prefix-limit maximum 

    - accepted-prefix-limit maximum

     

    from here http://www.juniper.net/documentation/en_US/junos12.3/topics/reference/configuration-statement/accepted-prefix-limit-edit-protocols-bgp.html and here http://www.juniper.net/documentation/en_US/junos12.3/topics/reference/configuration-statement/prefix-limit-edit-protocols-bgp.html I read:

     

    --prefix-limit Limit the number of prefixes received on a BGP peer session
    --accepted-prefix-limit  a limit to the number of prefixes that can be accepted on a BGP peer session.

     

    so here concept is between rceived and accepted. I am assuming the following:

     

    1) prefix-limit Limit -> prefixes received before the import policy

    2) accepted-prefix-limit  -> prefixes accepted after passing the import policy

     

    Does it make sense?

     

     



  • 2.  RE: difference between prefix-limit and accepted-prefix-limit
    Best Answer

    Posted 08-24-2017 04:16

    Hi Fab,

     

    Yes you are right.  The "accepted-prefix-limit" means the number of prefixes accepted by policy.  However, "prefix-limit" is the number of prefixes received on a BGP peer.

     

    As per the Juniper doc  also :

    "This functionality is identical to the prefix-limit functionality except that it operates against accepted prefixes rather than received prefixes."

     

     

    Regards,

    Rahul

    Please mark my solution as accepted if it helped.

     



  • 3.  RE: difference between prefix-limit and accepted-prefix-limit

    Posted 03-27-2019 20:40

    Hi Guys,

    Could you please suggest on below :

     

    In case prefixes exceed the configured prefix-limit, is there any option available to refuse/reject those "new prefixes", but should not tear down the BGP session? 

     

    Thanks, 

    Rajesh M



  • 4.  RE: difference between prefix-limit and accepted-prefix-limit

     
    Posted 03-27-2019 22:56

    Hi Rajesh,

     


    rajshetty.m@gmail.com wrote:

    Hi Guys,

    Could you please suggest on below :

     

    In case prefixes exceed the configured prefix-limit, is there any option available to refuse/reject those "new prefixes", but should not tear down the BGP session? 

     

    Thanks, 

    Rajesh M


     

    That's the default behavior, reject the prefixes and create a syslog message about it.  Session will teardown only if you include the keyword "teardown" in the command "prefix-limit".

     

    Hope this helps.

     

    Regards,
    -r.

    --------------------------------------------------

    If this solves your problem, please mark this post as "Accepted Solution."
    Kudos are always appreciated :).



  • 5.  RE: difference between prefix-limit and accepted-prefix-limit

    Posted 03-29-2019 20:53

    I tested it. it does not reject but only get log. test below

     

    R1 configuration below;

    set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.1/24
    set interfaces fxp0 unit 0 family inet dhcp vendor-id Juniper-vmx-VM5C9F5057B0
    set routing-options static route 1.1.1.1/32 receive
    set routing-options static route 1.1.1.2/32 receive
    set routing-options static route 1.1.1.3/32 receive
    set routing-options autonomous-system 12
    set protocols bgp group ibgp type internal
    set protocols bgp group ibgp export bgp
    set protocols bgp group ibgp neighbor 192.168.1.2
    set policy-options policy-statement bgp term 1 then accept

     

    R2 configuration below;

     

    set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.2/24
    set interfaces fxp0 unit 0 family inet dhcp vendor-id Juniper-vmx-VM5C9F50560F
    set routing-options autonomous-system 12
    set protocols bgp group ibgp type internal
    set protocols bgp group ibgp neighbor 192.168.1.1 family inet unicast prefix-limit maximum 3
    set protocols bgp group ibgp neighbor 192.168.1.1 family inet unicast accepted-prefix-limit maximum 2

     

    root# run show bgp summary
    Groups: 1 Peers: 1 Down peers: 0
    Table Tot Paths Act Paths Suppressed History Damp State Pending
    inet.0
    4 3 0 0 0 0
    Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
    192.168.1.1 12 25 21 0 0 8:44 3/4/4/0 0/0/0/0

     

    Mar 30 11:34:48 rpd[6797]: BGP_PREFIX_LIMIT_EXCEEDED: 192.168.1.1 (Internal AS 12): Configured maximum accepted prefix-limit(2) exceeded for inet-unicast nlri: 3 (instance master)
    Mar 30 11:35:18 rpd[6797]: BGP_PREFIX_LIMIT_EXCEEDED: 192.168.1.1 (Internal AS 12): Configured maximum prefix-limit(3) exceeded for inet-unicast nlri: 4 (instance master)
    Mar 30 11:35:48 rpd[6797]: BGP_PREFIX_LIMIT_EXCEEDED: 192.168.1.1 (Internal AS 12): Configured maximum prefix-limit(3) exceeded for inet-unicast nlri: 4 (instance master)
    Mar 30 11:37:48 last message repeated 4 times



  • 6.  RE: difference between prefix-limit and accepted-prefix-limit

    Posted 10-05-2019 21:42

    Only work if you set max prefix under routing-options 🙂