-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mgmt_vrf_namespace2: Repeating management vrf using namespace solutio… #2431
Conversation
…n with all changes together
Added this patch,
|
Feature was developed and tested only on 4.9 Kernel FYI.
After configuring VRF using the config commands specified in the management VRF design document mentioned above, you need to run 'config save' to save the configuration before reboot. Otherwise the configuration is not persistent across reboots.
Expected behavior if config is not saved before reboot.
By having it in separate chain we are isolating the rules from rest of the PREROUTING rules and it would be easier to dump mgmt vrf specific rules and manage them. If it is part of the PREROUTING then managing would be difficult, PREROUTING will have mgmt vrf rules along with other rules. Dumping mgmt vrf specific rule will be difficult. |
taking vrf-lite approach |
Update sonic-swss submodule pointer to include the following: * f0138a2 [portmgr] Fixed the orchagent crash due to late arrival of notif (sonic-net#2431) ([sonic-net#2451](sonic-net/sonic-swss#2451)) * 7cfde48 Change the log messages in addKernelNeigh/Route from ERROR to INFO ([sonic-net#2437](sonic-net/sonic-swss#2437)) * 2c5116e [202205][counters] Improve performance by polling only configured ports buffer queue/pg counters ([sonic-net#2432](sonic-net/sonic-swss#2432)) Signed-off-by: dgsudharsan <sudharsand@nvidia.com>
Update sonic-swss submodule pointer to include the following: * 04ce7be check state_db for po before sending ARP/ND pkts (sonic-net#2444) ([sonic-net#2450](sonic-net/sonic-swss#2450)) * f0138a2 [portmgr] Fixed the orchagent crash due to late arrival of notif (sonic-net#2431) ([sonic-net#2451](sonic-net/sonic-swss#2451)) * 7cfde48 Change the log messages in addKernelNeigh/Route from ERROR to INFO ([sonic-net#2437](sonic-net/sonic-swss#2437)) * 2c5116e [202205][counters] Improve performance by polling only configured ports buffer queue/pg counters ([sonic-net#2432](sonic-net/sonic-swss#2432)) Signed-off-by: dgsudharsan <sudharsand@nvidia.com>
Update sonic-swss submodule pointer to include the following: * 8eea92e [202205][counters] Revert PR sonic-net#2432 for the buffer queue/pg counters improvement ([sonic-net#2462](sonic-net/sonic-swss#2462)) * 5d8636a [202205] Enhance orchagent and buffer manager in error handling (sonic-net#2414) ([sonic-net#2449](sonic-net/sonic-swss#2449)) * aa22237 [Everflow/ERSPAN] Set correct destination port and mac address when the nexthop is updated for ERSPAN mirror destination (sonic-net#2392) ([sonic-net#2455](sonic-net/sonic-swss#2455)) * 04ce7be check state_db for po before sending ARP/ND pkts (sonic-net#2444) ([sonic-net#2450](sonic-net/sonic-swss#2450)) * f0138a2 [portmgr] Fixed the orchagent crash due to late arrival of notif (sonic-net#2431) ([sonic-net#2451](sonic-net/sonic-swss#2451)) * 7cfde48 Change the log messages in addKernelNeigh/Route from ERROR to INFO ([sonic-net#2437](sonic-net/sonic-swss#2437)) * 2c5116e [202205][counters] Improve performance by polling only configured ports buffer queue/pg counters ([sonic-net#2432](sonic-net/sonic-swss#2432)) Signed-off-by: dgsudharsan <sudharsand@nvidia.com>
Update sonic-swss submodule pointer to include the following: * 8eea92e [202205][counters] Revert PR #2432 for the buffer queue/pg counters improvement ([#2462](sonic-net/sonic-swss#2462)) * 5d8636a [202205] Enhance orchagent and buffer manager in error handling (#2414) ([#2449](sonic-net/sonic-swss#2449)) * aa22237 [Everflow/ERSPAN] Set correct destination port and mac address when the nexthop is updated for ERSPAN mirror destination (#2392) ([#2455](sonic-net/sonic-swss#2455)) * 04ce7be check state_db for po before sending ARP/ND pkts (#2444) ([#2450](sonic-net/sonic-swss#2450)) * f0138a2 [portmgr] Fixed the orchagent crash due to late arrival of notif (#2431) ([#2451](sonic-net/sonic-swss#2451)) * 7cfde48 Change the log messages in addKernelNeigh/Route from ERROR to INFO ([#2437](sonic-net/sonic-swss#2437)) * 2c5116e [202205][counters] Improve performance by polling only configured ports buffer queue/pg counters ([#2432](sonic-net/sonic-swss#2432))
Include: df92fb7 Improve verbosity level and provide more info in the log (sonic-net#2472) e81ed20 [intfmgr]: Enable `accept_untracked_na` kernel param (sonic-net#2436) 24d29f1 [orchdaemon]: Fixed sairedis record file rotation (sonic-net#2299) b8ee07d [build] add missing package libyang-dev in lgtm.yml (sonic-net#2475) e46dd29 [crm] Fix issue with continues EXCEEDED and CLEAR logs for ACL group/table counters (sonic-net#2463) b61d24c [doc]: Update README.md (sonic-net#2456) b9ade5d [orchagent] Fix issue: ip prefix shall be inited even if VRF/VNET is not ready (sonic-net#2461) f0f1eb4 Revert "[counters] Improve performance by polling only configured ports buffer queue/pg counters (sonic-net#2360)" (sonic-net#2458) 3d757a8 [ci][asan] add DVS tests run with ASAN (sonic-net#2441) 04fbc8e [ci] Only when test stage succeeded or succeededwithissues, PR run Gcov (sonic-net#2460) 7cc035f [orchagent]: Publish identified events via structured-events channel (sonic-net#2446) efa0f01 [QoS] Enforce drop probability only for colors whose WRED are enabled (sonic-net#2422) 05c5c2f [swss] Replace memset functions (sonic-net#2423) 9ff993d Modified the test file to remove click commands and do the REDIS-DB u… (sonic-net#2264) 9e376af Install libyang in azure pipeline. (sonic-net#2445) c1eb99a check state_db for po before sending ARP/ND pkts (sonic-net#2444) 43cc486 [portmgr] Fixed the orchagent crash due to late arrival of notif (sonic-net#2431) b62c716 Enhance orchagent and buffer manager in error handling (sonic-net#2414) 13bda3c [Everflow/ERSPAN] Set correct destination port and mac address when the nexthop is updated for ERSPAN mirror destination (sonic-net#2392) 0ccb315 Revert "[VS Test] Skip failing subport tests (sonic-net#2370)" (sonic-net#2421) ac8a83f [UT] [Portsyncd] Added Unit Tests for portsyncd (sonic-net#2297) 83a186a Change the log messages in addKernelNeigh/Route from ERROR to INFO (sonic-net#2437) 9c23389 [BFD]Clean up state_db BFD entries on swss restart (sonic-net#2434) d41aebf EntityBulker SIGSEGV when create_entry attr_count 0 (sonic-net#2224) f52a7b1 Fix the Fec Mode Setting of gbsyncd (sonic-net#2430) 8cc0a45 [neighsyncd] Enabling ipv4 link local entries for non-dualtor (sonic-net#2427) 5624e87 Revert "[ci][asan] add DVS tests run with ASAN (sonic-net#2363)" (sonic-net#2433) a26b26a Dynamic port configuration - add port buffer cfg to the port ref counter (sonic-net#2194) 486939a tlm_teamd: Filter portchannel subinterface events from STATE_DB LAG_TABLE (sonic-net#2408) a4b8992 [counters] Improve performance by polling only configured ports buffer queue/pg counters (sonic-net#2360) 4aaeec9 added support for Xsight platform (sonic-net#2426) ca9edca [ci][asan] add DVS tests run with ASAN (sonic-net#2363) dec4570 Handle dual ToR neighbor miss scenario (sonic-net#2151) 9eb4422 Upstream new development on p4orch (sonic-net#2237) e9be2c0 [lgtm] Fix dependency (sonic-net#2419) c0168f3 [muxorch] Returning true if nbr in skip_neighbor_ in isNeighborActive() (sonic-net#2415) cfcf3d8 [macsec]: Set MTU for MACsec (sonic-net#2398) 8346034 Delete Invalid if condition in intfsorch.cpp (sonic-net#2411) Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
Include: df92fb7 Improve verbosity level and provide more info in the log (#2472) e81ed20 [intfmgr]: Enable `accept_untracked_na` kernel param (#2436) 24d29f1 [orchdaemon]: Fixed sairedis record file rotation (#2299) b8ee07d [build] add missing package libyang-dev in lgtm.yml (#2475) e46dd29 [crm] Fix issue with continues EXCEEDED and CLEAR logs for ACL group/table counters (#2463) b61d24c [doc]: Update README.md (#2456) b9ade5d [orchagent] Fix issue: ip prefix shall be inited even if VRF/VNET is not ready (#2461) f0f1eb4 Revert "[counters] Improve performance by polling only configured ports buffer queue/pg counters (#2360)" (#2458) 3d757a8 [ci][asan] add DVS tests run with ASAN (#2441) 04fbc8e [ci] Only when test stage succeeded or succeededwithissues, PR run Gcov (#2460) 7cc035f [orchagent]: Publish identified events via structured-events channel (#2446) efa0f01 [QoS] Enforce drop probability only for colors whose WRED are enabled (#2422) 05c5c2f [swss] Replace memset functions (#2423) 9ff993d Modified the test file to remove click commands and do the REDIS-DB u… (#2264) 9e376af Install libyang in azure pipeline. (#2445) c1eb99a check state_db for po before sending ARP/ND pkts (#2444) 43cc486 [portmgr] Fixed the orchagent crash due to late arrival of notif (#2431) b62c716 Enhance orchagent and buffer manager in error handling (#2414) 13bda3c [Everflow/ERSPAN] Set correct destination port and mac address when the nexthop is updated for ERSPAN mirror destination (#2392) 0ccb315 Revert "[VS Test] Skip failing subport tests (#2370)" (#2421) ac8a83f [UT] [Portsyncd] Added Unit Tests for portsyncd (#2297) 83a186a Change the log messages in addKernelNeigh/Route from ERROR to INFO (#2437) 9c23389 [BFD]Clean up state_db BFD entries on swss restart (#2434) d41aebf EntityBulker SIGSEGV when create_entry attr_count 0 (#2224) f52a7b1 Fix the Fec Mode Setting of gbsyncd (#2430) 8cc0a45 [neighsyncd] Enabling ipv4 link local entries for non-dualtor (#2427) 5624e87 Revert "[ci][asan] add DVS tests run with ASAN (#2363)" (#2433) a26b26a Dynamic port configuration - add port buffer cfg to the port ref counter (#2194) 486939a tlm_teamd: Filter portchannel subinterface events from STATE_DB LAG_TABLE (#2408) a4b8992 [counters] Improve performance by polling only configured ports buffer queue/pg counters (#2360) 4aaeec9 added support for Xsight platform (#2426) ca9edca [ci][asan] add DVS tests run with ASAN (#2363) dec4570 Handle dual ToR neighbor miss scenario (#2151) 9eb4422 Upstream new development on p4orch (#2237) e9be2c0 [lgtm] Fix dependency (#2419) c0168f3 [muxorch] Returning true if nbr in skip_neighbor_ in isNeighborActive() (#2415) cfcf3d8 [macsec]: Set MTU for MACsec (#2398) 8346034 Delete Invalid if condition in intfsorch.cpp (#2411) Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
Related work items: sonic-net#2151, sonic-net#2194, sonic-net#2224, sonic-net#2237, sonic-net#2264, sonic-net#2281, sonic-net#2286, sonic-net#2297, sonic-net#2299, sonic-net#2305, sonic-net#2325, sonic-net#2335, sonic-net#2338, sonic-net#2341, sonic-net#2343, sonic-net#2347, sonic-net#2350, sonic-net#2355, sonic-net#2356, sonic-net#2358, sonic-net#2360, sonic-net#2363, sonic-net#2367, sonic-net#2368, sonic-net#2370, sonic-net#2374, sonic-net#2392, sonic-net#2398, sonic-net#2408, sonic-net#2414, sonic-net#2415, sonic-net#2419, sonic-net#2421, sonic-net#2422, sonic-net#2423, sonic-net#2426, sonic-net#2427, sonic-net#2430, sonic-net#2431, sonic-net#2433, sonic-net#2434, sonic-net#2436, sonic-net#2437, sonic-net#2441, sonic-net#2444, sonic-net#2445, sonic-net#2446, sonic-net#2456, sonic-net#2458, sonic-net#2460, sonic-net#2461, sonic-net#2463, sonic-net#2472, sonic-net#2475, sonic-net#11877, sonic-net#12024, sonic-net#12065, sonic-net#12097, sonic-net#12130, sonic-net#12209, sonic-net#12217, sonic-net#12244, sonic-net#12251, sonic-net#12255, sonic-net#12276, sonic-net#12284
…ic-net#2431) Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com> Bulk write to APP_DB i.e. alias, lanes, speed must be read through one notification by orchagent during create_port Handled a race condition in portmgrd which tries to immediately apply a mtu/admin_status SET notif after a DEL causing it to crash
- What I did
Added support for management VRF using namespace solution.
Requirements that are covered are explained in the design document. Enhancements required to support tacacs and snmptrap are also added. Enhanced the configuration for using --use-mgmt-vrf for tacacs server & snmptrap server configuration on top of namespace based solution for management VRF to configure the required rules for namespace solution.
Two PRs are raised, one for sonic-buildimage (this PR#2431) and other for sonic-utilities (sonic-net/sonic-utilities#431).
- How I did it
Added commands to enable/disable the management VRF. On enabling, it creates the management namespace, attached eth0 to management namespace, creates the required iptables rules and restarts the networking service. Detailed design is explained in the design document https://github.com/kannankvs/mvrf_namespace/blob/master/Management%20VRF%20Design%20Document%20Namespace.md. Namespace solution requires DNAT as explained in the design document. hostcfgd is enhanced to support maximum of 10 tacacs servers. Mapping between the user configured tacacs server IP/port and internally used local IP/port are maintained in this file for adding and deleting those NAT rules. For supporting snmptrap configuration, enhanced main.py & created sonic_snmp_trap_conf.py to configure the snmptrap server IP address/port and enhanced the file docker_image_ctl.j2 to create the required /usr/bin/snmp.sh script that adds the required DNAT rules during snmp service restart process.
- How to verify it
Use the following commands to enable/disable mgmt vrf and test the basic management VRF features.
config vrf add mgmt
config vrf del mgmt
config interface eth0 ip add ip/mask gatewayIP
Ex: config interface eth0 ip add 10.16.206.11/24 10.16.206.1
Using the above configuration, all applications like Ping, SSH, SCP, apt-get, etc., can be tested on management VRF using “ip netns exec mgmt COMMAND” as explained in the design document.
Use the following steps to test tacacs.
(a) config aaa authentication login tacacs+
(b) config tacacs authtype login
(c) config tacacs passkey testing123
(d) config tacacs add --use-mgmt-vrf serveripaddress
Use the following steps to test snmptrap.