Rashid_11 Posted July 11, 2018 Друзья, нигде не могу найти OID для SNR который выводит состояние порта (trunk, access). Кто сталкивался помогите пожалуйста. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
Rashid_11 Posted July 11, 2018 1.3.6.1.4.1.40418.7.100.3.2.1.15 1 is access,2 is trunk,3 is hybrid Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
u.s.s.r Posted July 15, 2018 А какой OID будет, чтобы узнать наличие тегирования фреймов на порту как такового (switchport trunk allowed vlan для конфигурирования в CLI) ? Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
u.s.s.r Posted July 16, 2018 Нашел такой OID SNMPv2-SMI::enterprises.40418.7.100.3.2.1.20.25 --xxx.100.3.2.1.20 portTrunkAllowedvlan OBJECT-TYPE SYNTAX OCTET STRING MAX-ACCESS read-write STATUS current DESCRIPTION "trunk port allowed vlan list string" ::= { priPortEntry 20 } а как расшифровать? SNMPv2-SMI::enterprises.40418.7.100.3.2.1.20.25 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00 0F FE 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
u.s.s.r Posted July 16, 2018 Расшифровал пока так, на PHP $binary=""; $hex_array=explode(" ", $portTrunkAllowedvlan ); foreach ($hex_array as $key => $value) { $binary.=str_pad( base_convert (trim($value), 16, 2) , 8, '0', STR_PAD_LEFT); } $vlans=""; for ($x=0; $x++<mb_strlen($binary)-1;){ if ($binary[$x]){ $vlans.=" $x"; } } echo $vlans; Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
ShyLion Posted July 16, 2018 Если кратко, то это битовая маска. Всего виланов 4096, вот 4096 бит тут и есть. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...