Closed mpiechocinski closed 4 years ago
Problem description: I am deleting interfaces IP with interfaces zone being set to 1, after re-adding the interfaces IP its zone is set to 0.
Steps to reproduce:
echo ' { "PORTCHANNEL": { "PortChannel01": { "admin_status": "up", "members": [ "Ethernet4" ], "min_links": "1", "mtu": "9100" } }, "PORTCHANNEL_INTERFACE": { "PortChannel01": {}, "PortChannel01|10.0.0.78/31": {} }, "PORTCHANNEL_MEMBER": { "PortChannel01|Ethernet4": {} } }' > dynamic_3.json sonic-cfggen -j dynamic_3.json --write-to-db sudo config nat add static basic 10.0.0.78 192.168.0.1 -nat_type dnat sudo config nat add interface PortChannel01 -nat_zone 1 show nat config zones sudo config interface ip remove PortChannel01 10.0.0.78/31 show nat config zones sudo config interface ip add PortChannel01 10.0.0.78/31 show nat config zones
echo ' { "PORTCHANNEL": { "PortChannel01": { "admin_status": "up", "members": [ "Ethernet4" ], "min_links": "1", "mtu": "9100" } }, "PORTCHANNEL_INTERFACE": { "PortChannel01": {}, "PortChannel01|10.0.0.78/31": {} }, "PORTCHANNEL_MEMBER": { "PortChannel01|Ethernet4": {} } }' > dynamic_3.json
sonic-cfggen -j dynamic_3.json --write-to-db
sudo config nat add static basic 10.0.0.78 192.168.0.1 -nat_type dnat
sudo config nat add interface PortChannel01 -nat_zone 1
show nat config zones
sudo config interface ip remove PortChannel01 10.0.0.78/31
sudo config interface ip add PortChannel01 10.0.0.78/31
Expected result: Interface zone should be set to 1 after re-adding its IP.
Actual result: Interface zone is set to 0 after re-adding its IP. See log linked at the bottom.
Environment: montara IP: 10.91.68.143 SONiC information:
SONiC Software Version: SONiC.HEAD.18-dirty-20200413.073958 Distribution: Debian 9.12 Kernel: 4.9.0-11-2-amd64 Build commit: d09fba37 Build date: Mon Apr 13 12:26:34 UTC 2020 Built by: johnar@jenkins-worker-8
Platform: x86_64-accton_wedge100bf_32x-r0 HwSKU: montara ASIC: barefoot Serial Number: AJ49009297 Uptime: 13:01:28 up 1 day, 3:32, 1 user, load average: 1.22, 1.25, 1.49 SDE information: "build_date": "Wed Jun 3 05:49:25 2020", "schema_version": "1.11.1", "compiler_version": "9.3.0", "target": "tofino", "program_name": "switch_tofino_x2",
Log:
@mpiechocinski This is expected behavior only.
Few points about nat zone :
@mpiechocinski, please verify and close the issue if problem not seen.
Problem description: I am deleting interfaces IP with interfaces zone being set to 1, after re-adding the interfaces IP its zone is set to 0.
Steps to reproduce:
echo ' { "PORTCHANNEL": { "PortChannel01": { "admin_status": "up", "members": [ "Ethernet4" ], "min_links": "1", "mtu": "9100" } }, "PORTCHANNEL_INTERFACE": { "PortChannel01": {}, "PortChannel01|10.0.0.78/31": {} }, "PORTCHANNEL_MEMBER": { "PortChannel01|Ethernet4": {} } }' > dynamic_3.json
sonic-cfggen -j dynamic_3.json --write-to-db
sudo config nat add static basic 10.0.0.78 192.168.0.1 -nat_type dnat
sudo config nat add interface PortChannel01 -nat_zone 1
show nat config zones
sudo config interface ip remove PortChannel01 10.0.0.78/31
show nat config zones
sudo config interface ip add PortChannel01 10.0.0.78/31
show nat config zones
Expected result: Interface zone should be set to 1 after re-adding its IP.
Actual result: Interface zone is set to 0 after re-adding its IP. See log linked at the bottom.
Environment: montara IP: 10.91.68.143 SONiC information:
SONiC Software Version: SONiC.HEAD.18-dirty-20200413.073958 Distribution: Debian 9.12 Kernel: 4.9.0-11-2-amd64 Build commit: d09fba37 Build date: Mon Apr 13 12:26:34 UTC 2020 Built by: johnar@jenkins-worker-8
Platform: x86_64-accton_wedge100bf_32x-r0 HwSKU: montara ASIC: barefoot Serial Number: AJ49009297 Uptime: 13:01:28 up 1 day, 3:32, 1 user, load average: 1.22, 1.25, 1.49 SDE information: "build_date": "Wed Jun 3 05:49:25 2020", "schema_version": "1.11.1", "compiler_version": "9.3.0", "target": "tofino", "program_name": "switch_tofino_x2",
Log: