Jump to content
Калькуляторы

oid trunk,access

Друзья, нигде не могу найти OID для SNR который выводит состояние порта (trunk, access). Кто сталкивался помогите пожалуйста.

Share this post


Link to post
Share on other sites

А какой OID будет, чтобы узнать наличие тегирования фреймов на порту как такового  (switchport trunk allowed vlan  для конфигурирования в CLI) ?

 

Share this post


Link to post
Share on other sites

Нашел такой 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
 

Share this post


Link to post
Share on other sites

Расшифровал пока так, на 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;

 

Share this post


Link to post
Share on other sites

Если кратко, то это битовая маска. Всего виланов 4096, вот 4096 бит тут и есть.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now