物理ポート番号とifIndexは一致します。
他にループバックインターフェース、vlan, channelにもifIndexは割り当てられます。
物理ポート数が10なら
11がループバックインターフェース (固定)
12から割り当てが始まります。
例1
SX3950/45
VLANが3つ(VALN1,2,3)channelグループが2つ(channel1,2)の場合
ifIndex 1(port1)
ifIndex 2(port2)
ifIndex 3(port3)
ifIndex 4(port4)
ifIndex 5(port5)
ifIndex 6(port6)
ifIndex 7(port7)
ifIndex 8(port8)
ifIndex 9(port9)
ifIndex 10(port10)
ifIndex 11(loopback)
ifIndex 12(VLAN1)
ifIndex 13(VLAN2)
ifIndex 14(VLAN3)
ifIndex 15(cannel1)
ifIndex 16(cannel2)
※設定時はifIndex 12以降、設定した順に割り当てられるので、この限りではありません。