MIM

Manage XGS4 Mac-in-MAC

MIM

Mac-in-Mac (IEEE 802.1ah provider backbone bridging): VPNs, MiM ports and multicast groups. The built-in help starts with “Only for XGS4 devices”. SONiC does not use MiM.

All words before the Key=<value> arguments must be written out in full; case does not matter. An unknown command prints Error:Unknown MIM command <n>. On chips without MiM support the commands fail with “Feature unavailable”.

mim vpn show and mim options are safe. mim init and mim detach reset or tear down the SDK’s MiM module, and every other command changes hardware state, all invisibly to SONiC.

Hardware-validated

drivshell> mim options Type=PORT
     RePLace                    0x00000004
     WithID                     0x00000001
     DRop                       0x00000008
     Access                     0x00000010
     BackBone                   0x00000020
     Peer                       0x00000040
     MatchServiceVlanTpid       0x00000080
     EgressTunnelServiceVlanReplace  0x00000100
     EgressLabel                0x00000200
     EgressServiceVlanTagged    0x00000400
     EgressServiceVlanAdd       0x00000800
     EgressServiceVlanReplace   0x00001000
     EgressServiceVlanDelete    0x00002000
     EgressServiceVlanTpidReplace  0x00004000
     EgressTunnelDestMacUseService  0x00020000
mim init

Initialise the MiM module. On failure it prints MIM_CLI: Error: bcm_mim_init failed, <reason>. mim detach tears it down. Both disrupt MiM if it is in use.

Unvalidated

drivshell> mim init
mim options Type=<PORT | PortMatch>

List the flag and port-match names accepted by mim vpn port add, one per line with its value in hex. Safe.

Hardware-validated

drivshell> mim options Type=PortMatch
  Port                       0x00000001
  PortVlan                   0x00000002
  PortVlanStacked            0x00000003
  TunnelVlanSrcMac           0x00000004
  Label                      0x00000005
mim vpn create VPN=<vpn_id> BroadcastGroup=<bcast_id> UnknownMulticastGroup=<umc_id> UnknownUnicastGroup=<uuc_id> LookupId=<isid> [Policer=<policer_id>]

Create a MiM VPN (I-SID) with its flood groups. mim vpn destroy VPN=<vpn_id> deletes it.

Unvalidated

drivshell> mim vpn create VPN=0x7001 BroadcastGroup=0x3000001 UnknownMulticastGroup=0x3000001 UnknownUnicastGroup=0x3000001 LookupId=0x10000
mim vpn show VPN=<vpn_id>

Show a MiM VPN. Safe. SONiC creates no MiM VPNs, so on a SONiC switch this fails with MIM_CLI: Error: bcm_mim_port_get_all failed, Entry not found for any VPN ID.

Hardware-validated

drivshell> mim vpn show VPN=0x7001
MIM_CLI: Error: bcm_mim_port_get_all failed, Entry not found

Failed to execute the diagnostic command. Error: Operation failed.
mim vpn port add VPN=<vpn_id> Port=<mim_port> PhysPort=<port> PortMatch=<pm> [IntfFlaGs=<flags>] [IntfCLass=<class>] [MatchVlan=<vid>] [MatchInnerVlan=<vid>] [MatchLabel=<label>] [MatchTunnelVlan=<vid>] [MatchTunnelSrcMAC=<mac>] [MatchServiceTPID=<tpid>] [EgressTunnelVlan=<vid>] [EgressTunnelSrcMAC=<mac>] [EgressTunnelDstMAC=<mac>] [EgressTunnelService=<isid>] [EgressServiceTPID=<tpid>] [EgressServiceVID=<vid>] [Policer=<policer_id>]

Add an access or backbone port to a MiM VPN. mim vpn port delete VPN=<vpn_id> MimPort=<mim_port_id> removes it.

Unvalidated

drivshell> mim vpn port delete VPN=0x7001 MimPort=0x14000001
mim tunnel l2 add Mac=<mac> Vlan=<vid>

Add the backbone MAC and VLAN at which MiM packets are terminated.

Unvalidated

drivshell> mim tunnel l2 add Mac=00:00:5e:00:53:01 Vlan=100
mim mcast group create [l2 | mim] McastGroup=<mcast_group>

Create a multicast group. The other forms are mim mcast group delete McastGroup=<id>, mim mcast group port add|delete McastGroup=<id> MimPort=<mim_port_id> and mim mcast group addr McastGroup=<id> Mac=<mac> VPN=<vpn_id>.

Unvalidated

drivshell> mim mcast group create mim McastGroup=10

Built-in help

Only for XGS4 devices.
      mim init
            - Init MIM software system.
      mim detach
            - Detach MIM software system.
      mim vpn create VPN=<vpn_id> BroadcastGroup=<bcast_id>
                     UnknownMulticastGroup=<umc_id>
                     UnknownUnicastGroup=<uuc_id>
                     LookupId=<isid>
                     Policer=<policer_id>
            - Create vpn with the given id, the ISID, broadcast group,
              unknown multicast group and unknown unicast group.
      mim vpn port add VPN=<vpn_id> Port=<Mim_port> PhysPort=<port>
                        PortMatch=<pm> IntfFlaGs=<flags> IntfCLass=<class>
                        MatchVlan=<vid> MatchInnerVlan=<ivid>
                        MatchLabel=<label> MatchTunnelVlan=<vlan>
                        MatchTunnelSrcMAC=<mac> MatchServiceTPID=<tpid>
                        EgressTunnelVlan=<vlan> EgressTunnelSrcMAC=<mac>
                        EgressTunnelDstMAC=<mac> EgressTunnelService=<isid>
                        EgressServiceTPID=<tpid> EgressServiceVID=<vid>
                        Policer=<policer_id>
            - Add a port to VPN.
      mim vpn port delete VPN=<vpn_id> MimPort=<mim_port_id>
            - Delete an MIM port from vpn.
      mim vpn destroy VPN=<vpn_id>
            - Destroy a vpn.
      mim vpn show VPN=<vpn_id>
            - Show VPN info.
      mim tunnel l2 add Mac=<mac> Vlan=<vlan>
            - Add L2 address for MIM lookup.
      mim mcast group create [l2|mim] McastGroup=<mcast_group>
            - Create a multicast group.
      mim mcast group delete McastGroup=<mcast_group>
            - Delete a multicast group.
      mim mcast group port add McastGroup=<mcast_type_id>
                                MimPort=<mim_port_id>
            - Add MIM port to multicast group.
      mim mcast group port delete  McastGroup=<mcast_type_id>
                                    MimPort=<mim_port_id>
            - Delete MIM port from multicast group
      mim mcast group addr McastGroup=<mcast_type_id>
                            Mac=<mcast mac> VPN=<vpn_type_id>
            - Add multicast group Mac address.
      mim options Type=[PORT|PortMatch]
            - List various options/flags used in mim commands.