You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org

SONiC

From Wikitech-static
Revision as of 14:29, 22 September 2021 by imported>Ayounsi (Initial page creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Configuration

Currently tested on the April 2021 release.

Manual

All configuration change done with sudo config need at some point a sudo config save to make them permanent (eg. device reboot)

Hostname

sudo config hostname dell-spine1

Management

SONiC supports having the management interface in a dedicated VRF, so the default management route (to mr1) doesn't risk impacting production traffic.

sudo config vrf add mgmt

sudo config interface ip add eth0 10.x.x.x/16 10.x.0.1

show management_interface address

https://github.com/Azure/SONiC/blob/master/doc/mgmt/sonic_stretch_management_vrf_design.md

https://github.com/Azure/sonic-utilities/blob/master/doc/Command-Reference.md#configuring-management-interface

SNMP

Have SNMP listen on its mgmt IP

sudo config snmpagentaddress add 10.x.x.x -v mgmt -p 161

In the tested release, sudo config snmp is not a valid configuration keyword.

Workaround to set the SNMP community:

sudo vim /etc/sonic/snmp.yml

sudo systemctl restart snmp

https://github.com/Azure/SONiC/wiki/How-to-Check-SNMP-Configuration

NTP

sudo config ntp add <server IP>

Known limitations

  • It is not possible to configure a DNS resolver, all configuration needs to be done using IPs
  • It is not possible to change the syslog facility
  • cgexec -g l3mdev:mgmt is supposed to run commands from the mgmt VRF, but fails with "cgroup change of group failed"