天天看点

cisco 常用OID

C:\usr\bin>snmpwalk.exe -M C:\usr\mibs -v 2c -c cisco 10.255.240.3:161 1.3.6.1.4.1.9.9.128.1.1.1

显示所有的int vlan ,非INT的不显示

1.3.6.1.4.1.9.9.68.1.2.2.1.1 显示的是vlan类型

1 : static

2 : dynamic

3 : multiVlan

1.3.6.1.4.1.9.9.68.1.2.2.1.2 显示的是此端口是什么vlan 可读写

1.3.6.1.4.1.9.9.68.1.2.2.1.3 vlan在这个端口的状态 只读

1 : inactive

2 : active

3 : shutdown

1.3.6.1.4.1.9.9.68.1.5.1.1.1 voice vlan默认 4096

1.3.6.1.4.1.9.9.13  为设备环境检测类

1.3.6.1.4.1.9.9.13.1.4.1.2 风扇描述

1.3.6.1.4.1.9.9.13.1.4.1.3 风扇的状态

1:normal

2:warning

3:critical

4:shutdown

5:notPresent

6:notFunctioning

1.3.6.1.4.1.9.9.13.1.5.1.2 电源描述

1.3.6.1.4.1.9.9.13.1.5.1.3 电源状态

1:normal

2:warning

3:critical

4:shutdown

5:notPresent

6:notFunctioning

1.3.6.1.4.1.9.9.13.1.5.1.4 电源供给类型

1 : unknown

2 : ac

3 : dc

4 : externalPowerSupply

5 : internalRedundant

1.3.6.1.4.1.9.9.23.1.1.1.1.2   cdp是否开启

1.3.6.1.4.1.9.9.23.1.1.1.1.3  cdp是否开启本设备使用的端口,要特殊处理在key上面

1.3.6.1.4.1.9.9.23.1.2.1.1.4 CDP的地址 16进制换成10

1.3.6.1.4.1.9.9.23.1.2.1.1.5 CDP的信息,

1.3.6.1.4.1.9.9.23.1.2.1.1.6 CDP对端设备名称

1.3.6.1.4.1.9.9.23.1.2.1.1.7 CDP 对端端口

1.3.6.1.4.1.9.9.23.1.2.1.1.8 CDP对端设备类号

1.3.6.1.4.1.9.9.25.1.1.1.2 设备的ios和一些版本信息

1.3.6.1.4.1.9.9.46 是vtp信息

1.3.6.1.4.1.9.9.46.1.3.1.1.4.1  可以得到所有Vlan的名称

1.3.6.1.4.1.9.9.48 设备内存信息

iso.3.6.1.2.1.47.1.2.1.1.4 获取SNMP所有值

iso.3.6.1.2.1.47.1.2.1.1.4.12 = STRING: "cisco@505"

iso.3.6.1.2.1.47.1.2.1.1.4.13 = STRING: "cisco@688"

iso.3.6.1.2.1.47.1.2.1.1.4.14 = STRING: "cisco@689"

iso.3.6.1.2.1.47.1.2.1.1.4.15 = STRING: "cisco@555"

ip-mac对应表

1.3.6.1.2.1.3.1.1.2.13.1

1.3.6.1.2.1.3.1.1.2.13.1.10.255.240.1 = Hex-STRING: E8 ED F3 8F 6B 41 

1.3.6.1.2.1.3.1.1.1.13.1

这个IP对应的vlan 为 13

1.3.6.1.2.1.3.1.1.1.13.1.10.255.240.1 = INTEGER: 13

这个IP地址对应的IP地址值

iso.3.6.1.2.1.3.1.1.3.13.1.10.255.240.1 = IpAddress: 10.255.240.1

ip get mac

C:\usr\bin>snmpwalk.exe -M C:\usr\bin\mibs\ -v 2c -c cisco 10.255.240.30:161 1.3.6.1.2.1.4.22.1.2.13.10.255.240.1 

iso.3.6.1.2.1.4.22.1.2.13.10.255.240.1 = Hex-STRING: E8 ED F3 8F 6B 41

check mac vlan must

C:\usr\bin>snmpwalk.exe -M C:\usr\bin\mibs\ -v 2c -c cisco @13 10.255.240.30:161 1.3.6.1.2.1.17.4.3.1.1.232.237.243.143.107.65

iso.3.6.1.2.1.17.4.3.1.1.232.237.243.143.107.65 = Hex-STRING: E8 ED F3 8F 6B 41

check macid  vlan must

C:\usr\bin>snmpwalk.exe -M C:\usr\bin\mibs\ -v 2c -c cisco@13 10.255.240.20:161 1.3.6.1.2.1.17.4.3.1.2.232.237.243.143.107.65

iso.3.6.1.2.1.17.4.3.1.2.232.237.243.143.107.65 = INTEGER: 3

check mackid

C:\usr\bin>snmpwalk.exe -M C:\usr\bin\mibs\ -v 2c -c cisco10.255.240.30:161 1.3.6.1.2.1.17.1.4.1.1.3

iso.3.6.1.2.1.17.1.4.1.1.3 = INTEGER: 3

get macid go portid

C:\usr\bin>snmpwalk.exe -M C:\usr\bin\mibs\ -v 2c -c cisco10.255.240.30:161 1.3.6.1.2.1.17.1.4.1.2.3

iso.3.6.1.2.1.17.1.4.1.2.3 = INTEGER: 10103

get portid to name

C:\usr\bin>snmpwalk.exe -M C:\usr\bin\mibs\ -v 2c -c cisco10.255.240.30:161 1.3.6.1.2.1.31.1.1.1.1.10103

iso.3.6.1.2.1.31.1.1.1.1.10103 = STRING: "Gi1/0/3"

this port is cdp ?