the absolute max session id is 999_999_999 which in binary is: $ perl -e 'printf"%032b$/",999999999' 00111011100110101100100111111111 you have the 2 most significant bits to work with. %NASs = ( '192.168.254.12' => 0, '192.168.255.13' => 1, '192.168.256.2' => 2, '192.168.243.1' => 3 ); so you can fit 4 IP's and a session id in 32 bits. if you want to assume that your session id won't go above 463129087 then you can steal another bit and have 8 IPs. $ perl -le 'print unpack "N", pack "B*", "00011011100110101100100111111111"' 463129087 or along the same lines, use the NAS number and session id with a dot, only because it's easier for humans. 1.4596831 12.4596831 instead of the 16bit big numbers... #### $ snmpget -v 1 $CENSORED sysDescr.9999999999 Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: system.sysDescr.4294967295 $ snmpget -v 1 $CENSORED sysDescr.4294967294 Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: system.sysDescr.4294967294 $ snmpget -v 1 $CENSORED sysDescr.4294967295 Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: system.sysDescr.4294967295 $ snmpget -v 1 $CENSORED sysDescr.4294967296 Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: system.sysDescr.4294967295