18263c99dd
To fix [DPB| wrong aliases for interfaces](https://github.com/Azure/sonic-buildimage/issues/6024) issue, implimented flexible alias support [design doc](https://github.com/Azure/SONiC/pull/749) > [[dpb|config] Fix the validation logic of breakout mode](https://github.com/Azure/sonic-utilities/pull/1440) depends on this #### How I did it 1. Removed `"alias_at_lanes"` from port-configuration file(i.e. platfrom.json) 2. Added dictionary to "breakout_modes" values. This defines the breakout modes available on the platform for this parent port, and it maps to the alias list. The alias list presents the alias names for individual ports in order under this breakout mode. ``` { "interfaces": { "Ethernet0": { "index": "1,1,1,1", "lanes": "0,1,2,3", "breakout_modes": { "1x100G[40G]": ["Eth1"], "2x50G": ["Eth1/1", "Eth1/2"], "4x25G[10G]": ["Eth1/1", "Eth1/2", "Eth1/3", "Eth1/4"], "2x25G(2)+1x50G(2)": ["Eth1/1", "Eth1/2", "Eth1/3"], "1x50G(2)+2x25G(2)": ["Eth1/1", "Eth1/2", "Eth1/3"] } } } ``` #### How to verify it `config interface breakout` Signed-off-by: Sangita Maity <samaity@linkedin.com> |
||
---|---|---|
.. | ||
docker-gbsyncd-vs | ||
docker-sonic-vs | ||
docker-syncd-vs | ||
sonic-version | ||
tests | ||
create_vnet.sh | ||
docker-gbsyncd-vs.dep | ||
docker-gbsyncd-vs.mk | ||
docker-ptf.dep | ||
docker-ptf.mk | ||
docker-sonic-vs.dep | ||
docker-sonic-vs.mk | ||
docker-syncd-vs.dep | ||
docker-syncd-vs.mk | ||
gbsyncd-vs.mk | ||
kvm-image.dep | ||
kvm-image.mk | ||
libsaithrift-dev.dep | ||
libsaithrift-dev.mk | ||
one-image.dep | ||
one-image.mk | ||
onie.dep | ||
onie.mk | ||
platform.conf | ||
raw-image.dep | ||
raw-image.mk | ||
README.gns3.md | ||
README.vsdocker.md | ||
README.vsvm.md | ||
rules.dep | ||
rules.mk | ||
sonic_multiasic.xml | ||
sonic-gns3a.sh | ||
sonic-version.dep | ||
sonic-version.mk | ||
sonic.xml | ||
syncd-vs.dep | ||
syncd-vs.mk |
HOWTO Use Virtual Switch (VM)
- Install libvirt, kvm, qemu
sudo apt-get install libvirt-clients qemu-kvm libvirt-bin
- Create SONiC VM for single ASIC HWSKU
$ sudo virsh
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh #
virsh # create sonic.xml
Domain sonic created from sonic.xml
virsh #
- Create SONiC VM for multi-ASIC HWSKU Update sonic_multiasic.xml with the external interfaces required for HWSKU.
$ sudo virsh
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh #
virsh # create sonic_multiasic.xml
Domain sonic created from sonic.xml
virsh #
Once booted up, create a file "asic.conf" with the content:
NUM_ASIC=<Number of asics>
under /usr/share/sonic/device/x86_64-kvm_x86_64-r0/
Also, create a "topology.sh" file which will simulate the internal
asic connectivity of the hardware under
/usr/share/sonic/device/x86_64-kvm_x86_64-r0/<HWSKU>
The HWSKU directory will have the required files like port_config.ini
for each ASIC.
Having done this, a new service "topology.service" will be started
during bootup which will invoke topology.sh script.
3. Access virtual switch:
1. Connect SONiC VM via console
```
$ telnet 127.0.0.1 7000
```
OR
2. Connect SONiC VM via SSH
1. Connect via console (see 3.1 above)
2. Request a new DHCP address
```
sudo dhclient -v
```
3. Connect via SSH
```
$ ssh -p 3040 admin@127.0.0.1
```