-
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
management vrf using vrf function of new kernel #2411
Conversation
@nikos-github , you are using ifupdown2 to bring up eth0, do you have that PR. i think that will simplify the template here? |
@lguohan For the dhcp case with ifupdown2 and putting eth0 in the mgmt vrf by default, below are the changes I made. Nothing else was needed.
|
That's cool. Actually I'm using this way at beginning (https://stackoverflow.com/questions/53946282/how-to-define-vrf-interfaces-in-etc-network-interfaces), but I got errors, so I change my code. I will try this way again follow this patch. |
@batmancn The table with ifupdown2 needs to be in the 1001 to 1255 range when you specify it. I picked 1001 above. |
Oh, this patch could not work. If it's my mistake? This is the /etc/network/interfaces I process
I use this command
This is the error I got
I use 'sonic-mellanox-201811-6f371.bin', this is my OS
|
Still some error.
|
A couple of things. You can't have both ifupdown and ifupdown2. Also, when you specify dhcp for eth0 instead of the static IP that you have in config_db.json, you will clearly get the discrepancy you are observing. The point Guohan was making is that even with static IP assignment, the template you have for eth0 in the mgmt vrf can be simplified. |
56051a7
to
af623bc
Compare
@batmancn The builds are failing because of unit tests. Have a look at src/sonic-config-engine/tests/test_j2files.py in def test_interfaces(self). I think we also want to parameterize this configuration unless the plan is to have it on by default for both dhcp and static address assignment. Please check with @lguohan. |
Update sonic-swss submodule pointer to include the following: * Dynamic port configuration - add port buffer cfg to the port ref counter ([sonic-net#2194](sonic-net/sonic-swss#2194)) * tlm_teamd: Filter portchannel subinterface events from STATE_DB LAG_TABLE ([sonic-net#2408](sonic-net/sonic-swss#2408)) * [counters] Improve performance by polling only configured ports buffer queue/pg counters ([sonic-net#2360](sonic-net/sonic-swss#2360)) * added support for Xsight platform ([sonic-net#2426](sonic-net/sonic-swss#2426)) * [ci][asan] add DVS tests run with ASAN ([sonic-net#2363](sonic-net/sonic-swss#2363)) * Handle dual ToR neighbor miss scenario ([sonic-net#2151](sonic-net/sonic-swss#2151)) * Upstream new development on p4orch ([sonic-net#2237](sonic-net/sonic-swss#2237)) * [lgtm] Fix dependency ([sonic-net#2419](sonic-net/sonic-swss#2419)) * [muxorch] Returning true if nbr in skip_neighbor_ in isNeighborActive() ([sonic-net#2415](sonic-net/sonic-swss#2415)) * [macsec]: Set MTU for MACsec ([sonic-net#2398](sonic-net/sonic-swss#2398)) * Delete Invalid if condition in intfsorch.cpp ([sonic-net#2411](sonic-net/sonic-swss#2411)) Signed-off-by: dprital <drorp@nvidia.com>
``` 99425a8 (HEAD -> 202205, origin/202205) [actions] Support Semgrep by Github Actions (sonic-net#2417) f41e4d1 Fix for show vxlan tunnel command display issue sonic-net#11902 (sonic-net#2391) e1d827e [VxLAN]Fix Vxlan delete command to throw error when there are references (sonic-net#2404) d77acf8 [doc] add documentation on automatic techsupport based on memory (sonic-net#2411) 2cfc75a [doc] update "config feature" section with "--block" option (sonic-net#2409) 9dc8471 [Vxlanmgrd] [CPA] Update the vxlan_tunnel name len to be under IFNAMIZ to overcome netdev creation failure (sonic-net#2398) 342589e Added cisco config platform commands (sonic-net#2242) (sonic-net#2418) be7da6b [sonic-installer] use host docker startup arguments when running dockerd in chroot (sonic-net#2179) (sonic-net#2407) d112f7c [202205][auto-ts] add memory check (sonic-net#2116) (sonic-net#2413) ``` Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
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>
linkmgrd: * a5ac7f6 2022-10-05 | [Active-Active] Post link prober stats to state db (sonic-net#140) (HEAD -> 202205, github/202205) [Jing Zhang] * f4b0e53 2022-10-05 | [Active-Active] Retry config mux mode standby (sonic-net#139) [Jing Zhang] utilities: * a255838 2022-10-04 | [minigraph] new workflow for golden path (sonic-net#2396) (HEAD -> 202205, github/202205) [jingwenxie] * 99425a8 2022-10-03 | [actions] Support Semgrep by Github Actions (sonic-net#2417) [Mai Bui] * f41e4d1 2022-09-30 | Fix for show vxlan tunnel command display issue sonic-net#11902 (sonic-net#2391) [Senthil Bhava] * e1d827e 2022-09-29 | [VxLAN]Fix Vxlan delete command to throw error when there are references (sonic-net#2404) [Sudharsan Dhamal Gopalarathnam] * d77acf8 2022-09-28 | [doc] add documentation on automatic techsupport based on memory (sonic-net#2411) [Stepan Blyshchak] * 2cfc75a 2022-09-28 | [doc] update "config feature" section with "--block" option (sonic-net#2409) [Stepan Blyshchak] * 9dc8471 2022-09-28 | [Vxlanmgrd] [CPA] Update the vxlan_tunnel name len to be under IFNAMIZ to overcome netdev creation failure (sonic-net#2398) [Vivek] * 342589e 2022-10-03 | Added cisco config platform commands (sonic-net#2242) (sonic-net#2418) [yucgu] swss: * 9d9f395 2022-10-04 | [intfmgr]: Enable `accept_untracked_na` kernel param (sonic-net#2436) (HEAD -> 202205, github/202205) [Lawrence Lee] * 6b6d25d 2022-10-04 | [orchdaemon]: Fixed sairedis record file rotation (sonic-net#2480) [Bryan Crossland] Signed-off-by: Ying Xie <ying.xie@microsoft.com>
linkmgrd: * a5ac7f6 2022-10-05 | [Active-Active] Post link prober stats to state db (#140) (HEAD -> 202205, github/202205) [Jing Zhang] * f4b0e53 2022-10-05 | [Active-Active] Retry config mux mode standby (#139) [Jing Zhang] utilities: * a255838 2022-10-04 | [minigraph] new workflow for golden path (#2396) (HEAD -> 202205, github/202205) [jingwenxie] * 99425a8 2022-10-03 | [actions] Support Semgrep by Github Actions (#2417) [Mai Bui] * f41e4d1 2022-09-30 | Fix for show vxlan tunnel command display issue #11902 (#2391) [Senthil Bhava] * e1d827e 2022-09-29 | [VxLAN]Fix Vxlan delete command to throw error when there are references (#2404) [Sudharsan Dhamal Gopalarathnam] * d77acf8 2022-09-28 | [doc] add documentation on automatic techsupport based on memory (#2411) [Stepan Blyshchak] * 2cfc75a 2022-09-28 | [doc] update "config feature" section with "--block" option (#2409) [Stepan Blyshchak] * 9dc8471 2022-09-28 | [Vxlanmgrd] [CPA] Update the vxlan_tunnel name len to be under IFNAMIZ to overcome netdev creation failure (#2398) [Vivek] * 342589e 2022-10-03 | Added cisco config platform commands (#2242) (#2418) [yucgu] swss: * 9d9f395 2022-10-04 | [intfmgr]: Enable `accept_untracked_na` kernel param (#2436) (HEAD -> 202205, github/202205) [Lawrence Lee] * 6b6d25d 2022-10-04 | [orchdaemon]: Fixed sairedis record file rotation (#2480) [Bryan Crossland] Signed-off-by: Ying Xie <ying.xie@microsoft.com> Signed-off-by: Ying Xie <ying.xie@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>
ac71d745d [VxLAN]Fix Vxlan delete command to throw error when there are references (#2404) 7419c6731 Added cisco config platform commands (#2242) 8760bbe80 Add UT to check sonic installer does not depend on database (#2401) 6bef65260 [doc] add documentation on automatic techsupport based on memory (#2411) 4a783745f [doc] update "config feature" section with "--block" option (#2409) dd6210fcc [Vxlanmgrd] [CPA] Update the vxlan_tunnel name len to be under IFNAMIZ to overcome netdev creation failure (#2398) bdc4a8a60 Fix broken pipeline build URL (#2363) b31681b43 Fix display disorder problem of show vrf (#2392) 123504a85 YANG validation for ConfigDB Updates: portchannel add/remove, loopback interface, VLAN 28f6820c6 [link-local]Modify RIF check to include link-local enabled interfaces (#2394)
423779410 [muxcable][config] add CLI support for mux mode detach (sonic-net#2425) a817896b1 YANG validation for ConfigDB Updates: MGMT_INTERFACE, PORTCHANNEL_MEMBER use cases (sonic-net#2420) 81e2aecca [minigraph] new workflow for golden path (sonic-net#2396) c1206aac3 ConfigDB Updates with YANG Validation: Include potential for YANG validation even when adhoc validation is used (sonic-net#2412) 57c509a9d [show] vnet endpoint [ip/ipv6] command (sonic-net#2342) 4b2b766ac [actions] Support Semgrep by Github Actions (sonic-net#2417) 156257e2a check for vxlan mapping before removing vlan (sonic-net#2388) cb0edd310 Fix for show vxlan tunnel command display issue sonic-net#11902 (sonic-net#2391) ac71d745d [VxLAN]Fix Vxlan delete command to throw error when there are references (sonic-net#2404) 7419c6731 Added cisco config platform commands (sonic-net#2242) 8760bbe80 Add UT to check sonic installer does not depend on database (sonic-net#2401) 6bef65260 [doc] add documentation on automatic techsupport based on memory (sonic-net#2411) 4a783745f [doc] update "config feature" section with "--block" option (sonic-net#2409) dd6210fcc [Vxlanmgrd] [CPA] Update the vxlan_tunnel name len to be under IFNAMIZ to overcome netdev creation failure (sonic-net#2398) bdc4a8a60 Fix broken pipeline build URL (sonic-net#2363) b31681b43 Fix display disorder problem of show vrf (sonic-net#2392) 123504a85 YANG validation for ConfigDB Updates: portchannel add/remove, loopback interface, VLAN 28f6820c6 [link-local]Modify RIF check to include link-local enabled interfaces (sonic-net#2394)
*Delete invalid if condition for nat_zone
Implement management vrf function follow this spec, phase 1. This PR based on #2348 .
#2405 also define management vrf function, by namespace. This is another way to implement management vrf using vrf function in new kernel 4.5.
I use DB to set management vrf.
I use 'interfaces-config.sh' to trigger network restart.
For details, refer to 'How to verify it' section.
Services based on old socket will be break down in a short time, like sshd/ntpd/logd...