Routing

last person joined: 3 days ago 

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.
Expand all | Collapse all

Configuring BGP

  • 1.  Configuring BGP

    Posted 11-03-2016 12:59

    Hi,

     

    We receive the following error:

     

    Nov 3 19:21:47.839893 BGP RECV 1.1.1.1+179 -> 1.1.1.2+61759
    Nov 3 19:21:47.839985 BGP RECV message type 3 (Notification) length 21
    Nov 3 19:21:47.840038 BGP RECV Notification code 2 (Open Message Error) subcode 2 (bad peer AS number)
    Nov 3 19:21:47.840183 bgp_recv_open: peer 1.1.1.1 (External AS 9999): received NOTIFICATION code 2 (Open Message Error) subcode 2 (bad peer AS number)

     

    The BGP is in active mode instead of established

     

    what might be the problem ?

     

     

    Thanks



  • 2.  RE: Configuring BGP

    Posted 11-03-2016 13:14

    the AS numbere does not match. AS 9999 tells you that he has configured a different AS number as peer than you are sending

     

    regards

     

    alexander



  • 3.  RE: Configuring BGP

    Posted 11-03-2016 13:31

    Thank you Alex,

     

    Here is first peer configuration:
    set protocols bgp group ex-peers type external
    set protocols bgp group ex-peers log-updown
    set protocols bgp group ex-peers peer-as 9999
    set protocols bgp group ex-peers neighbor 1.1.1.1 export permit-net

    set policy-options policy-statement permit-net term 1 from route-filter 1.1.2.1/29 exact
    set policy-options policy-statement permit-net term 1 then accept
    set policy-options policy-statement permit-net term 2 then reject

    set routing-options autonomous-system 33333

    set routing-options interface-routes rib-group inet all-ribs
    set routing-options rib-groups all-ribs import-rib inet.0


    Here is second peer configuration:
    set protocols bgp group to-customer neighbor 1.1.1.2 local-address 1.1.1.1
    set protocols bgp group to-customer neighbor 1.1.1.2 passive
    set protocols bgp group to-customer neighbor 1.1.1.2 log-updown
    set protocols bgp group to-customer neighbor 1.1.1.2 import IN
    set protocols bgp group to-customer neighbor 1.1.1.2 export OUT
    set protocols bgp group to-customer neighbor 1.1.1.2 peer-as 22222

    set policy-options policy-statement IN term 1 from route-filter 2.1.2.1/27 exact
    set policy-options policy-statement IN term 1 from route-filter 1.1.2.1/29 exact
    set policy-options policy-statement IN term 1 then local-preference 600
    set policy-options policy-statement IN term 1 then community add 9999:33333
    set policy-options policy-statement IN term 1 then accept
    set policy-options policy-statement IN term 10 then reject

    set interfaces ae0 unit 1 vlan-id 18
    set interfaces ae0 unit 1 family inet policer input 5M-policy
    set interfaces ae0 unit 1 family inet policer output 5M-policy
    set interfaces ae0 unit 1 family inet address 1.1.1.1/30

     

    what we're missing and what is wrong

    Thanks in advance



  • 4.  RE: Configuring BGP

     
    Posted 11-03-2016 14:06

    Hi,

     

    There is mismatch in ASN:

    set routing-options autonomous-system 33333
    ------------------------------------------------------------------------
    set protocols bgp group eBGP-to-customers neighbor 1.1.1.2 peer-as 22222

    Cheers,

    Ashvin



  • 5.  RE: Configuring BGP

    Posted 11-03-2016 14:09

    As per your configuration posted, the peer-as set on second router should be 33333 (local as of peered Router ASN)

     

    set protocols bgp group eBGP-to-customers neighbor 1.1.1.2 peer-as 22222

     

    From your config, your local AS of second peer router must be AS 9999

     

    Please change the ASN as explained above and conform these setting.



  • 6.  RE: Configuring BGP

    Posted 11-03-2016 22:30

    When you configure the local-addres, the IP address (local-address 1.1.1.1) must be configured on the loopback interface. Likewise the peer that you are peering to must also have the local-adress statement and that address must also be on the loopback interface. You can make both local-address or remove the local-address and simply add the neighbor IP.



  • 7.  RE: Configuring BGP

    Posted 11-07-2016 06:39

    Thanks

    We changed the AS

    But we receive no routes from the emote side

     

    show route receive-protocol bgp 1.1.1.2

    <<nothing>>

     

    The following error we see on our side:

     

    bgp_read_v4_message:10416: NOTIFICATION received from 1.1.1.2 (External AS 22222): code 6 (Cease) subcode 3 (Peer Unconfigured)
    RPD_BGP_NEIGHBOR_STATE_CHANGED: BGP peer 1.1.1.2 (External AS 22222) changed state from Established to Idle (event RecvNotify) (instance master)
    RPD_BGP_NEIGHBOR_STATE_CHANGED: BGP peer 1.1.1.2 (External AS 22222) changed state from EstabSync to Established (event RsyncAck) (instance master)
    bgp_read_v4_message:10416: NOTIFICATION received from 1.1.1.2 (External AS 22222): code 6 (Cease) subcode 4 (Administratively Reset)
    RPD_BGP_NEIGHBOR_STATE_CHANGED: BGP peer 1.1.1.2 (External AS 22222) changed state from Established to Idle (event RecvNotify) (instance master)
    RPD_BGP_NEIGHBOR_STATE_CHANGED: BGP peer 1.1.1.2 (External AS 22222) changed state from EstabSync to Established (event RsyncAck) (instance master)



  • 8.  RE: Configuring BGP

    Posted 11-08-2016 08:20

    the peer is not configured as stated in the log you posted..



  • 9.  RE: Configuring BGP
    Best Answer

    Posted 11-09-2016 10:58
    its a little bit confusing
    i'm not an expert in BGP .. but here is my advise ..
    - try to configure it without the 'passive' statement
    - search if both networks you're trying to receive is configured statically somehow from another old configuration without noticing .. things happen!


  • 10.  RE: Configuring BGP

    Posted 11-10-2016 02:47

    Are you wanting to do loopback peering? If yes, then make sure the address you are using is configured on the loopback interface. Your peers address must alos be on the loopback interface on there end. You should also configure the multihop statement (use a ttl of 2). Then must you must also have a route the loopback address ( a static route will do). If the answer to the question is no, remove the local-address statement and simply use the neighbor statement. I am not sure you are reading the suggestions and responding accordingly.

    You can turn on traceoptions so you can see more information.



  • 11.  RE: Configuring BGP

    Posted 11-12-2016 04:30

    Thanks to all of you guys! This has been resolved ..

    There was a discard static route on the other side