Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

BGP neighbor flap upon changing MED value

0

0

Article ID: KB33937 KB Last Updated: 11 Mar 2019Version: 1.0
Summary:

When there are two BGP neighbors under one group and change the metric-out value of one neighbor, one BGP neighbor flaps.

Symptoms:

Test topology

   +------+                            +-------+
   |      +------------ EBGP ----------+  mx2  |
   |      |                            +-------+
   |  mx  |                            AS=64662
   |      |
   |      |                            +-------+
   |      +------------ EBGP ----------+  mx1  |
   +------+                            +-------+
   AS=64661                            AS=64662

[edit]
User@mx# show protocols bgp
group EBGP {
    type external;
    neighbor 192.168.2.2 {
        metric-out igp 20;
        peer-as 64662;
    }
    neighbor 192.168.1.2 {
        metric-out igp 15;
        peer-as 64662;
    }
}

[edit]
User@mx# set protocols bgp group EBGP neighbor 192.168.1.2 metric-out igp 20

[edit]
User@mx# show |compare
[edit protocols bgp group EBGP neighbor 192.168.1.2 metric-out]
-       igp 15;
+       igp 20;

[edit]
User@mx# commit
commit complete

In Junos 15.1R1 and higher, one BGP neighbor flaps (down and up) with notification message of code 6 (Cease) subcode 9 (Hard Reset).

*** messages ***
Feb 13 17:46:52.321  mx rpd[2233]: bgp_peer_delete:9705: NOTIFICATION sent to 192.168.1.2 (External AS 64662): code 6 (Cease) subcode 9 (Hard Reset) [code 6 (Cease) subcode 3 (Peer Unconfigured)], Reason: Peer Deletion
Feb 13 17:46:52.322  mx LSYS1:rpd[3715]: bgp_handle_notify:4346: NOTIFICATION received from 192.168.1.1 (External AS 64661): code 6 (Cease) subcode 9 (Hard Reset) [code 6 (Cease) subcode 3 (Peer Unconfigured)]
Cause:

This is an expected behavior. Since the MED is a component of the group membership, it is the correct behavior for the neighbor to be removed from the group on the MED change.

In Junos 14.2, one BGP neighbor flaps (down and up) with notification message of code 6 (Cease) subcode 3 (Peer Unconfigured).

*** messages ***
Jan 22 15:39:46.696  mx rpd[1586]: bgp_peer_delete:8157: NOTIFICATION sent to 192.168.1.2 (External AS 64662): code 6 (Cease) subcode 3 (Peer Unconfigured), Reason: Peer Deletion
Jan 22 15:39:46.698  mx LSYS1:rpd[1618]: bgp_read_v4_message:10924: NOTIFICATION received from 192.168.1.1 (External AS 64661): code 6 (Cease) subcode 3 (Peer Unconfigured)
Solution:

To avoid the BGP neighbor flap (down and up), configure two BGP groups under protocols BGP stanza.

[edit]
User@mx# show protocols bgp
group EBGP_2 {
    type external;
    neighbor 192.168.2.2 {
        metric-out igp 20;
        peer-as 64662;
    }
}
group EBGP_1 {
    type external;
    neighbor 192.168.1.2 {
        metric-out igp 15;
        peer-as 64662;
    }
}

[edit]
User@mx# set protocols bgp group EBGP_1 neighbor 192.168.1.2 metric-out igp 20

[edit]
User@mx# show |compare
[edit protocols bgp group EBGP_1 neighbor 192.168.1.2 metric-out]
-       igp 15;
+       igp 20;

[edit]
User@mx# commit
commit complete

No BGP neighbor flap.
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search