When SRX interface is configured with bandwidth settings and shaping rate different than the peer device connected to it, packet drops are seen in one direction.
BGP and BFD flapped at the same time several times a day. The BFD was bought down by BGP. This is shown in the messages and traceoptions output below:
Dec 3 17:41:01 rpd[1421]: RPD_BGP_NEIGHBOR_STATE_CHANGED: BGP peer 2001:3000::0067 (External AS 21302) changed state from Established to Idle (event Closed) (instance master) Dec 3 17:41:01 rpd[1421]: bgp_recv: peer 2001:3000::0067 (External AS 21302): received unexpected EOF Dec 3 17:41:01 bfdd[1435]: BFDD_TRAP_SHOP_STATE_DOWN: local discriminator: 9213, new state: down, interface: ge-0/0/2.2, peer addr: 2001:3000::0067 Dec 3 17:41:01 bfdd[1435]: BFD Session 2001:3000::0067 (IFL 77) state Up -> Down LD/RD(9213/26231) Up time:04:20:42 Local diag: AdminDown Remote diag: None Reason: Received Upstream Destroy Session. Dec 3 17:41:03 rpd[1421]: RPD_BGP_NEIGHBOR_STATE_CHANGED: BGP peer 172.22.25.34 (External AS 21302) changed state from Established to Idle (event Closed) (instance master) Dec 3 17:41:03 rpd[1421]: bgp_recv: peer 172.22.25.34 (External AS 21302): received unexpected EOF Dec 3 17:41:03 bfdd[1435]: BFDD_TRAP_SHOP_STATE_DOWN: local discriminator: 9214, new state: down, interface: ge-0/0/2.2, peer addr: 172.22.25.34 Dec 3 17:41:03 bfdd[1435]: BFD Session 172.22.25.34 (IFL 77) state Up -> Down LD/RD(9214/26232) Up time:04:20:39 Local diag: AdminDown Remote diag: None Reason: Received Upstream Destroy Session.
Dec 3 17:41:01 Received Upstream DestroySession (3) len 16: <<<<< Down Up time:04:20:42 Local reason: AdminDown Remote reason: None local discr = 9213 remote discr = 26231 tx :1000000 rx :1000000 Dec 3 17:41:01 Session 2001:3000::0067 (IFL 77) flap count 1 Dec 3 17:41:01 BFDD_TRAP_SHOP_STATE_DOWN: local discriminator: 9213, new state: down, interface: ge-0/0/2.2, peer addr: 2001:3000::0067 Dec 3 17:41:01 Session 2001:3000::0067 (IFL 77) state Down -> AdminDown Dec 3 17:41:01 Sent Downstream SetAdj (11) len 147:
Every time the BFD session goes down, it gets a message from upstream which is BGP, and then it tears down the BFD session. The BFD was bought down by BGP, not vice versa.
Presence of mismatched bandwidth and shaping rates causes packet drops in one direction in an asymmetric setting. This leads to packet drops affecting keep-alive based protocols like BGP/BFD .
In this example, the peer device was configured with interface bandwidth set to 8M and shaping to 8M; whereas the SRX was configured with10m bandwidth and shaping rate was set to 9856000 under Class of Service.
In order to fix this, correct the interface bandwidth to 8m and shaping-rate 8m to match the peer device's CoS configuration.
Example change on SRX:
# show | compare rollback 11 [edit interfaces ge-0/0/2 unit 2] - bandwidth 10m; + bandwidth 8m; [edit class-of-service interfaces ge-0/0/2 unit 2] - shaping-rate 9856000; + shaping-rate 8m;