-
Notifications
You must be signed in to change notification settings - Fork 1.2k
L2 Switch mode
Qi Luo edited this page Apr 25, 2018
·
22 revisions
SONiC switches are normally operated in Layer 3 Switch mode, however, they could also be operated as L2 Switch. This document will describe the basic features supported in L2 Switch mode.
Below is a sample command line. User should provide a SKU parameter. The output file is stdout for validation purpose.
sonic-cfggen -t /usr/local/lib/python2.7/dist-packages/usr/share/sonic/templates/l2switch.j2 -p -k Mellanox-SN2700
Existing ConfigDB will be overwritten.
sonic-cfggen -t /usr/local/lib/python2.7/dist-packages/usr/share/sonic/templates/l2switch.j2 -p -k Mellanox-SN2700 | sudo config load /dev/stdin -y
Below is a sample command line. Please replace the eth0 and gwaddr values with correct management IP address and default gateway address.
cat <<EOF | sudo config load /dev/stdin -y
{
"MGMT_INTERFACE": {
"eth0|10.10.184.69/26": {
"gwaddr": "10.10.184.65"
}
}
}
EOF
sudo config save
Port speed is initially specified in the minigraph and load into ConfigDB. During runtime, we could config port speed by CLI. Below is a sample.
sudo config interface speed Ethernet0 40000
We could verify the port speed by CLI.
show interface status
-
For Users
-
For Developers
-
Subgroups/Working Groups
-
Presentations
-
Join Us