Skip to content

Instantly share code, notes, and snippets.

@nikushi
Last active December 30, 2015 10:59
Show Gist options
  • Save nikushi/7819765 to your computer and use it in GitHub Desktop.
Save nikushi/7819765 to your computer and use it in GitHub Desktop.
SNMPのインタフェースのindex番号は重複するのか?
こういう状態で
$ snmpwalk -c public -v 2c localhost:10161 ifDesc
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifDescr.3 = STRING: eth1
IF-MIB::ifDescr.4 = STRING: veth0
IF-MIB::ifDescr.5 = STRING: veth1
IF-MIB::ifDescr.6 = STRING: eth1.100
veth0,veth0を消した
$ snmpwalk -c public -v 2c localhost:10161 ifDesc
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifDescr.3 = STRING: eth1
IF-MIB::ifDescr.6 = STRING: eth1.100
eth1.200を追加した(4ではなく7が選ばれた)
$ snmpwalk -c public -v 2c localhost:10161 ifDesc
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifDescr.3 = STRING: eth1
IF-MIB::ifDescr.6 = STRING: eth1.100
IF-MIB::ifDescr.7 = STRING: eth1.200
リブートした後
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifDescr.3 = STRING: eth1
IF-MIB::ifDescr.4 = STRING: eth1.100 # 以前は 4 は veth0 だった!!!!!
IF-MIB::ifDescr.5 = STRING: eth1.200 # 以前は 4 は veth0 だった!!!!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment