Add iptables rules to drop all bgp packets destined for loopback1 IP addresses in dual ToR#262
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@yyynini can you please add the description for this PR? |
|
@yyynini Please check if it needs to update the test case in test_cacl_application for dualtor |
…v4 and ipv6 addresses
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
hi @yyynini could you help to update the description part as we do in sonic-buildimage repo? |
scripts/caclmgrd
Outdated
| if iface_name.startswith(loopback1_name): | ||
| loopback1_intf = ipaddress.ip_interface(iface_cidr) | ||
| loopback1_addr = loopback1_intf.ip | ||
| # Add iptables rules to drop all packets destined for loopback1 IP addresses |
There was a problem hiding this comment.
minor one, in the comment part, not all packets, but the BGP packets.
prsunny
left a comment
There was a problem hiding this comment.
lgtm, few clarification questions.
|
|
||
| return allow_internal_docker_ip_cmds | ||
|
|
||
| def generate_block_bgp_loopback1(self, namespace, config_db_connector): |
There was a problem hiding this comment.
Can you confirm it covers both active-standy and active-active dualtor scenarios?
There was a problem hiding this comment.
Yes, the BGP block rule is applied for both DualToR scenarios.
| loopback1_addr = loopback1_intf.ip | ||
| # Add iptables rules to drop all packets destined for loopback1 IP addresses | ||
| if isinstance(loopback1_addr, ipaddress.IPv4Address): | ||
| drop_dulator_bgp_loopback1_cmds.append(self.iptables_cmd_ns_prefix[namespace] + |
There was a problem hiding this comment.
-I is good. Lets ensure that there are no other ACCEPT rules above this.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@yejianquan , please take to 202505 |
Hi @prsunny , feature-labels work is after PR got merged |
|
hi @yejianquan merged. |
… dualtor (#18766) What is the motivation for this PR? This PR updates the DualToR config to enforce the same loopback1 IP address for both ToRs. Based on a recent Incident 628608070 : [SONiC RCA][SLB_DNC] Gemini Tors dropping vip traffic, we need to block BGP from being established on loopback1. How did you do it? Assign the same loopback1 IP to both ToRs. Added an iptables rules to drop the packets sonic-net/sonic-host-services#262 How did you verify/test it? Confirmed both ToRs used the same loopback1 IP, and verify the drop rule.
… dualtor (sonic-net#18766) What is the motivation for this PR? This PR updates the DualToR config to enforce the same loopback1 IP address for both ToRs. Based on a recent Incident 628608070 : [SONiC RCA][SLB_DNC] Gemini Tors dropping vip traffic, we need to block BGP from being established on loopback1. How did you do it? Assign the same loopback1 IP to both ToRs. Added an iptables rules to drop the packets sonic-net/sonic-host-services#262 How did you verify/test it? Confirmed both ToRs used the same loopback1 IP, and verify the drop rule.
… dualtor (sonic-net#18766) What is the motivation for this PR? This PR updates the DualToR config to enforce the same loopback1 IP address for both ToRs. Based on a recent Incident 628608070 : [SONiC RCA][SLB_DNC] Gemini Tors dropping vip traffic, we need to block BGP from being established on loopback1. How did you do it? Assign the same loopback1 IP to both ToRs. Added an iptables rules to drop the packets sonic-net/sonic-host-services#262 How did you verify/test it? Confirmed both ToRs used the same loopback1 IP, and verify the drop rule.
|
Cherry-pick PR to 202505: #269 |
… dualtor (sonic-net#18766) What is the motivation for this PR? This PR updates the DualToR config to enforce the same loopback1 IP address for both ToRs. Based on a recent Incident 628608070 : [SONiC RCA][SLB_DNC] Gemini Tors dropping vip traffic, we need to block BGP from being established on loopback1. How did you do it? Assign the same loopback1 IP to both ToRs. Added an iptables rules to drop the packets sonic-net/sonic-host-services#262 How did you verify/test it? Confirmed both ToRs used the same loopback1 IP, and verify the drop rule.
… dualtor (#18766) What is the motivation for this PR? This PR updates the DualToR config to enforce the same loopback1 IP address for both ToRs. Based on a recent Incident 628608070 : [SONiC RCA][SLB_DNC] Gemini Tors dropping vip traffic, we need to block BGP from being established on loopback1. How did you do it? Assign the same loopback1 IP to both ToRs. Added an iptables rules to drop the packets sonic-net/sonic-host-services#262 How did you verify/test it? Confirmed both ToRs used the same loopback1 IP, and verify the drop rule.
… dualtor (sonic-net#18766) What is the motivation for this PR? This PR updates the DualToR config to enforce the same loopback1 IP address for both ToRs. Based on a recent Incident 628608070 : [SONiC RCA][SLB_DNC] Gemini Tors dropping vip traffic, we need to block BGP from being established on loopback1. How did you do it? Assign the same loopback1 IP to both ToRs. Added an iptables rules to drop the packets sonic-net/sonic-host-services#262 How did you verify/test it? Confirmed both ToRs used the same loopback1 IP, and verify the drop rule.
… dualtor (sonic-net#18766) What is the motivation for this PR? This PR updates the DualToR config to enforce the same loopback1 IP address for both ToRs. Based on a recent Incident 628608070 : [SONiC RCA][SLB_DNC] Gemini Tors dropping vip traffic, we need to block BGP from being established on loopback1. How did you do it? Assign the same loopback1 IP to both ToRs. Added an iptables rules to drop the packets sonic-net/sonic-host-services#262 How did you verify/test it? Confirmed both ToRs used the same loopback1 IP, and verify the drop rule. Signed-off-by: opcoder0 <[email protected]>
… dualtor (sonic-net#18766) What is the motivation for this PR? This PR updates the DualToR config to enforce the same loopback1 IP address for both ToRs. Based on a recent Incident 628608070 : [SONiC RCA][SLB_DNC] Gemini Tors dropping vip traffic, we need to block BGP from being established on loopback1. How did you do it? Assign the same loopback1 IP to both ToRs. Added an iptables rules to drop the packets sonic-net/sonic-host-services#262 How did you verify/test it? Confirmed both ToRs used the same loopback1 IP, and verify the drop rule. Signed-off-by: Aharon Malkin <[email protected]>
… dualtor (sonic-net#18766) What is the motivation for this PR? This PR updates the DualToR config to enforce the same loopback1 IP address for both ToRs. Based on a recent Incident 628608070 : [SONiC RCA][SLB_DNC] Gemini Tors dropping vip traffic, we need to block BGP from being established on loopback1. How did you do it? Assign the same loopback1 IP to both ToRs. Added an iptables rules to drop the packets sonic-net/sonic-host-services#262 How did you verify/test it? Confirmed both ToRs used the same loopback1 IP, and verify the drop rule. Signed-off-by: Guy Shemesh <[email protected]>
… dualtor (sonic-net#18766) What is the motivation for this PR? This PR updates the DualToR config to enforce the same loopback1 IP address for both ToRs. Based on a recent Incident 628608070 : [SONiC RCA][SLB_DNC] Gemini Tors dropping vip traffic, we need to block BGP from being established on loopback1. How did you do it? Assign the same loopback1 IP to both ToRs. Added an iptables rules to drop the packets sonic-net/sonic-host-services#262 How did you verify/test it? Confirmed both ToRs used the same loopback1 IP, and verify the drop rule.
… dualtor (sonic-net#18766) What is the motivation for this PR? This PR updates the DualToR config to enforce the same loopback1 IP address for both ToRs. Based on a recent Incident 628608070 : [SONiC RCA][SLB_DNC] Gemini Tors dropping vip traffic, we need to block BGP from being established on loopback1. How did you do it? Assign the same loopback1 IP to both ToRs. Added an iptables rules to drop the packets sonic-net/sonic-host-services#262 How did you verify/test it? Confirmed both ToRs used the same loopback1 IP, and verify the drop rule. Signed-off-by: Guy Shemesh <[email protected]>
… dualtor (sonic-net#18766) What is the motivation for this PR? This PR updates the DualToR config to enforce the same loopback1 IP address for both ToRs. Based on a recent Incident 628608070 : [SONiC RCA][SLB_DNC] Gemini Tors dropping vip traffic, we need to block BGP from being established on loopback1. How did you do it? Assign the same loopback1 IP to both ToRs. Added an iptables rules to drop the packets sonic-net/sonic-host-services#262 How did you verify/test it? Confirmed both ToRs used the same loopback1 IP, and verify the drop rule. Signed-off-by: Yael Tzur <[email protected]>

Why I did it
issue: https://msazure.visualstudio.com/One/_workitems/edit/32910131/
Based on a recent Incident 628608070 : [SONiC RCA][SLB_DNC] Gemini Tors dropping vip traffic, we need to block BGP from being established on loopback1.
This PR addresses the requirement to block BGP packets on lookback1 for both active-active and active-standby dual tor scenarios.
How I did it
-Ito ensure its priority over all the other ACCEPT rules.How to verify it