Generating ifIndexes for various interfaces

ifIndex can be generated offline for various interface types such as physical interface, LAG (port-channel) interface, VE interface, loopback interface, tunnel interface and Management interface.

To generate ifIndex for a specific interface, perform the following steps.
  1. Enter SLX-OS Linux shell from privileged EXEC mode.
    device# start-shell
  2. Retrieve syntax to find available options to generate ifIndex.
    [admin@SLX]# /fabos/cliexec/ifindex_gen.py -h
    usage: ifindex_gen.py [-h] -i INTF_TYPE [-t LC_TYPE] [-m MODE] [-s SLOT]
                          [-p PORT] [-sp SUB_PORT] [-lp LAG_PORT]
                          [-vb VE_BRIDGE_ID] [-vi VE_INTF_ID] [-tt TUNNEL_TYPE]
                          [-ti TUNNEL_ID] [-lbi LB_INTF_ID] [-mi MGMT_INTF_ID]
                          [-d DISP_MODE]
    arguments:
    -h, --help        show this help message and exit 
    -i INTF_TYPE      Interface type: [phy (physical) | lag | ve | tunnel | lb 
                      (loopback) | mgmt (management)] 
    -t LC_TYPE        LC type: [72x10G | 36x100G]                             
    -m MODE           PortGroup Mode: [40g | 100g] (required when LC type is  
                      36x100G) 
    -s SLOT           Slot #: [1-8]                                           
    -p PORT           Port #: [1-72] for 72x10G, [1-60] for 36x100G LC type   
    -sp SUB_PORT      Sub Port #: [1-4] for break-out ports (required when LC 
                      type is 36x100G, PortGroup Mode is 40g and break-out is 
                      enabled)                                                 
    -lp LAG_PORT      LAG Port #: [1-512] 
    -vb VE_BRIDGE_ID  VE Bridge ID: [0-255] 
    -vi VE_INTF_ID    VE Interface ID: [1-4096] 
    -tt TUNNEL_TYPE   Tunnel type: [vxlan | gre | nvgre | mpls] 
    -ti TUNNEL_ID     Tunnel ID: [1-1024] 
    -lbi LB_INTF_ID   Loopback Interface ID: [1-255] 
    -mi MGMT_INTF_ID  Management Interface ID: [1-2] 
    -d DISP_MODE      Output Display Mode: [bin | dec | hex | all] (default: 
                      dec) 
    
    Note: The parameters -t, -m, -s, -p, and -sp are the sub-options specific to physical interface.
  3. Generate ifIndex for a specific interface. In this example, ifIndex is generated for a physical interface.
    [admin@SLX]# /fabos/cliexec/ifindex_gen.py -i physical -t 72x10G -s 2 -p 65 -d all
    Decimal :  413171855
    Hex     :  18a0808f
    Binary  :  00011000101000001000000010001111