Skip to content

Commit adaed21

Browse files
prsunnyraphaelt-nvidia
authored andcommitted
[IPinIP] Add Loopback2 interface, change dscp mode to uniform (sonic-net#7234)
Co-authored-by: Ubuntu <prsunny>
1 parent 877807d commit adaed21

File tree

7 files changed

+30
-16
lines changed

7 files changed

+30
-16
lines changed

dockers/docker-orchagent/ipinip.json.j2

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{% if DEVICE_METADATA['localhost']['sub_role'] == 'FrontEnd' or DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd'%}
66
{% set loopback_intf_names = ['Loopback0', 'Loopback4096'] %}
77
{% else %}
8-
{% set loopback_intf_names = ['Loopback0'] %}
8+
{% set loopback_intf_names = ['Loopback0', 'Loopback2', 'Loopback3'] %}
99
{% endif %}
1010
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
1111
{%- if prefix | ipv4 and name in loopback_intf_names %}
@@ -47,11 +47,10 @@
4747
"TUNNEL_DECAP_TABLE:IPINIP_TUNNEL" : {
4848
"tunnel_type":"IPINIP",
4949
"dst_ip":"{% for prefix in ipv4_addresses|sort %}{{ prefix | ip }}{% if not loop.last %},{% endif %}{% endfor %}",
50-
{% if "mlnx" in DEVICE_METADATA.localhost.platform %}
5150
"dscp_mode":"uniform",
51+
{% if "mlnx" in DEVICE_METADATA.localhost.platform %}
5252
"ecn_mode":"standard",
5353
{% else %}
54-
"dscp_mode":"pipe",
5554
"ecn_mode":"copy_from_outer",
5655
{% endif %}
5756
"ttl_mode":"pipe"
@@ -66,11 +65,10 @@
6665
"TUNNEL_DECAP_TABLE:IPINIP_V6_TUNNEL" : {
6766
"tunnel_type":"IPINIP",
6867
"dst_ip":"{% for prefix in ipv6_addresses|sort %}{{ prefix | ip }}{% if not loop.last %},{% endif %}{% endfor %}",
69-
{% if "mlnx" in DEVICE_METADATA.localhost.platform %}
7068
"dscp_mode":"uniform",
69+
{% if "mlnx" in DEVICE_METADATA.localhost.platform %}
7170
"ecn_mode":"standard",
7271
{% else %}
73-
"dscp_mode":"pipe",
7472
"ecn_mode":"copy_from_outer",
7573
{% endif %}
7674
"ttl_mode":"pipe"

src/sonic-config-engine/tests/multi_npu_data/py2/ipinip.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"TUNNEL_DECAP_TABLE:IPINIP_TUNNEL" : {
44
"tunnel_type":"IPINIP",
55
"dst_ip":"10.0.0.0,10.1.0.1,10.1.0.3,10.1.0.32,8.0.0.0",
6-
"dscp_mode":"pipe",
6+
"dscp_mode":"uniform",
77
"ecn_mode":"copy_from_outer",
88
"ttl_mode":"pipe"
99
},
@@ -14,7 +14,7 @@
1414
"TUNNEL_DECAP_TABLE:IPINIP_V6_TUNNEL" : {
1515
"tunnel_type":"IPINIP",
1616
"dst_ip":"fc00:1::32,fc00::1,fd00:1::32",
17-
"dscp_mode":"pipe",
17+
"dscp_mode":"uniform",
1818
"ecn_mode":"copy_from_outer",
1919
"ttl_mode":"pipe"
2020
},

src/sonic-config-engine/tests/multi_npu_data/py3/ipinip.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"TUNNEL_DECAP_TABLE:IPINIP_TUNNEL" : {
44
"tunnel_type":"IPINIP",
55
"dst_ip":"10.0.0.0,10.1.0.1,10.1.0.3,10.1.0.32,8.0.0.0",
6-
"dscp_mode":"pipe",
6+
"dscp_mode":"uniform",
77
"ecn_mode":"copy_from_outer",
88
"ttl_mode":"pipe"
99
},
@@ -14,7 +14,7 @@
1414
"TUNNEL_DECAP_TABLE:IPINIP_V6_TUNNEL" : {
1515
"tunnel_type":"IPINIP",
1616
"dst_ip":"fc00:1::32,fc00::1,fd00:1::32",
17-
"dscp_mode":"pipe",
17+
"dscp_mode":"uniform",
1818
"ecn_mode":"copy_from_outer",
1919
"ttl_mode":"pipe"
2020
},

src/sonic-config-engine/tests/sample_output/py2/bgpd_quagga.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ router bgp 65100
2323
bgp graceful-restart restart-time 240
2424
bgp graceful-restart
2525
bgp router-id 10.1.0.32
26+
network 10.1.0.32/32
2627
address-family ipv6
2728
network fc00:1::32/64
2829
exit-address-family
29-
network 10.1.0.32/32
3030
network 192.168.200.1/27
3131
network 192.168.0.1/27
3232
neighbor 10.0.0.59 remote-as 64600

src/sonic-config-engine/tests/sample_output/py2/ipinip.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{
33
"TUNNEL_DECAP_TABLE:IPINIP_TUNNEL" : {
44
"tunnel_type":"IPINIP",
5-
"dst_ip":"10.0.0.56,10.0.0.58,10.0.0.60,10.0.0.62,10.1.0.32,192.168.0.1,192.168.200.1",
6-
"dscp_mode":"pipe",
5+
"dst_ip":"10.0.0.56,10.0.0.58,10.0.0.60,10.0.0.62,10.1.0.32,10.21.0.64,10.21.64.2,192.168.0.1,192.168.200.1",
6+
"dscp_mode":"uniform",
77
"ecn_mode":"copy_from_outer",
88
"ttl_mode":"pipe"
99
},
@@ -14,7 +14,7 @@
1414
"TUNNEL_DECAP_TABLE:IPINIP_V6_TUNNEL" : {
1515
"tunnel_type":"IPINIP",
1616
"dst_ip":"fc00:1::32,fc00::71,fc00::75,fc00::79,fc00::7d",
17-
"dscp_mode":"pipe",
17+
"dscp_mode":"uniform",
1818
"ecn_mode":"copy_from_outer",
1919
"ttl_mode":"pipe"
2020
},

src/sonic-config-engine/tests/sample_output/py3/ipinip.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{
33
"TUNNEL_DECAP_TABLE:IPINIP_TUNNEL" : {
44
"tunnel_type":"IPINIP",
5-
"dst_ip":"10.0.0.56,10.0.0.58,10.0.0.60,10.0.0.62,10.1.0.32,192.168.0.1,192.168.200.1",
6-
"dscp_mode":"pipe",
5+
"dst_ip":"10.0.0.56,10.0.0.58,10.0.0.60,10.0.0.62,10.1.0.32,10.21.0.64,10.21.64.2,192.168.0.1,192.168.200.1",
6+
"dscp_mode":"uniform",
77
"ecn_mode":"copy_from_outer",
88
"ttl_mode":"pipe"
99
},
@@ -14,7 +14,7 @@
1414
"TUNNEL_DECAP_TABLE:IPINIP_V6_TUNNEL" : {
1515
"tunnel_type":"IPINIP",
1616
"dst_ip":"fc00:1::32,fc00::71,fc00::75,fc00::79,fc00::7d",
17-
"dscp_mode":"pipe",
17+
"dscp_mode":"uniform",
1818
"ecn_mode":"copy_from_outer",
1919
"ttl_mode":"pipe"
2020
},

src/sonic-config-engine/tests/t0-sample-graph.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,22 @@
185185
</a:Prefix>
186186
<a:PrefixStr>10.10.0.99/32</a:PrefixStr>
187187
</a:LoopbackIPInterface>
188+
<a:LoopbackIPInterface>
189+
<Name>LoopbackIP2</Name>
190+
<AttachTo>Loopback2</AttachTo>
191+
<a:Prefix xmlns:b="Microsoft.Search.Autopilot.Evolution">
192+
<b:IPPrefix>10.21.0.64/32</b:IPPrefix>
193+
</a:Prefix>
194+
<a:PrefixStr>10.21.0.64/32</a:PrefixStr>
195+
</a:LoopbackIPInterface>
196+
<a:LoopbackIPInterface>
197+
<Name>LoopbackIP3</Name>
198+
<AttachTo>Loopback3</AttachTo>
199+
<a:Prefix xmlns:b="Microsoft.Search.Autopilot.Evolution">
200+
<b:IPPrefix>10.21.64.2/32</b:IPPrefix>
201+
</a:Prefix>
202+
<a:PrefixStr>10.21.64.2/32</a:PrefixStr>
203+
</a:LoopbackIPInterface>
188204
</LoopbackIPInterfaces>
189205
<ManagementIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
190206
<a:ManagementIPInterface>

0 commit comments

Comments
 (0)