ModMap
MODID Remapping
- ModMap
Shortest form:
mm.Module-ID remapping for stacked switches: map fabric module IDs to local or switch module IDs on stack ports. Type the sub-commands in full. The help’s
FMod=,LMod=andSMod=are short forms ofFModule=,LModule=andSModule=.These commands act only on stack ports. A SONiC switch has none, so
modmap showandmodmap smod getprint nothing and both modmap groups are empty.modmap lmod getstill answers for any port.show,group show,lmod getandsmod getare read-only. The other forms change the stacking configuration.- modmap show
Show for each stack port whether module-ID mapping is enabled:
port <p> modid mapping enabled.ordisabled.Without stack ports it prints nothing. Read-only.Hardware-validated
drivshell> modmap show
- modmap enable [PortBitMap=<pbmp>]
Enable module-ID remapping on the stack ports in the bitmap.
modmap disableis the inverse. Changes the ASIC.Unvalidated
drivshell> modmap enable pbm=ce0
- modmap disable [PortBitMap=<pbmp>]
Disable module-ID remapping. Changes the ASIC.
Unvalidated
drivshell> modmap disable pbm=ce0
- modmap lmod get [Port=<port>]
Print
port <p> has fmod=<f> maps to lmod=<l>.Read-only.Hardware-validated
drivshell> modmap lmod get port=ce0 port ce0 has fmod=0 maps to lmod=0.
- modmap lmod set [Port=<port>] [FModule=<fmod>] [LModule=<lmod>]
Map a fabric module ID to a local module ID on a port. Changes the ASIC.
Unvalidated
drivshell> modmap lmod set port=ce0 fmod=4 lmod=0
- modmap smod get [PortBitMap=<pbmp>] [FModule=<fmod>]
Print the fabric→switch module mappings as
port <p>: fmod=<f> maps smod=<s> with <n> ports (base_port=<b>). Ports that are not stack ports are skipped, so on a SONiC switch it prints nothing. Read-only.Hardware-validated
drivshell> modmap smod get pbm=ce0 fmod=4
- modmap smod set [PortBitMap=<pbmp>] [FModule=<fmod>] [SModule=<smod>] [SPort=<port>] [NPorts=<n>]
Set a fabric→switch module mapping. Changes the ASIC.
Unvalidated
drivshell> modmap smod set pbm=ce0 fmod=4 smod=1 sport=0 nports=64
- modmap group show
Print the members of modmap groups 0 and 1 as
Modmap group 0: <pbmp>. Read-only.Hardware-validated
drivshell> modmap group show Modmap group 0: none Modmap group 1: none
- modmap group set [PortBitMap=<pbmp>] [Group=<n>]
Assign ports to a modmap group (the group number must not exceed the chip’s maximum). Changes the ASIC.
Unvalidated
drivshell> modmap group set pbm=ce0 group=1
Built-in help
Usages: modmap enable [PortBitMap = <pbmp>] - Enable MODID remapping modmap disable [PortBitMap = <pbmp>] - Disable MODID remapping modmap lmod set [Port = <val>] [FMod = <val>] [LMod = <val>] - Set mapping between fabric module id and local module id modmap lmod get [Port = <val>] - Get mapping between fabric module id and local module id modmap smod set [PortBitMap = <pbmp>] [FMod = <val>] [SMod = <val>] [SPort = <val>] [NPorts = <val>] - Set mapping between fabric module id and switch module id modmap smod get [PortBitMap = <pbmp>] [FMod = <val>] - Get mapping between fabric module id and switch module id modmap group set [PortBitMap = <pbmp>] [Group = <val>] - Set the group membership of ports modmap group show - Display the group membership of all ports modmap show - Show MODID mapping states