Get the dhcp client hostname in snmp.

I have a requirement to get the host-name of the dhcpclient in snmp so I can monitor who is on the network.

The information is available in the router:


[admin@MikroTik] /ip dhcp-server lease> print
Flags: X - disabled, R - radius, D - dynamic, B - blocked

ADDRESS MAC-ADDRESS HOST-NAME SERVER RATE-LIMIT STATUS

0 D 10.5.51.251 00:23:15:50:4C:B8 schu-PC dhcp2 bound
1 D 10.5.50.165 60:FA:CD:85:79:1E camdens-iP… dhcp1 bound
2 D 10.5.50.175 00:1F:3A:A4:B3:0E L20345 dhcp1 bound
3 D 10.5.51.248 28:6A:BA:D3:06:3A mikegs-iPad dhcp2 bound
4 D 10.5.50.164 28:6A:BA:D3:06:3A mikegs-iPad dhcp1 bound
5 D 10.5.50.163 00:C6:10:B1:66:00 Tariks-Pod dhcp1 bound


But If I go pull it from snmp I don’t see the information:


snmpwalk -c public -v 2c -m ALL -On 10.10.10.10 .1.3.6.1.2.1.9999
.1.3.6.1.2.1.9999.1.1.1.1.0 = STRING: “MikroTik DHCP server”
.1.3.6.1.2.1.9999.1.1.1.2.0 = OID: .1.3.6.1.4.1.14988.1
.1.3.6.1.2.1.9999.1.1.6.4.1.4.10.5.50.163 = INTEGER: 2
.1.3.6.1.2.1.9999.1.1.6.4.1.4.10.5.50.164 = INTEGER: 2
.1.3.6.1.2.1.9999.1.1.6.4.1.4.10.5.50.165 = INTEGER: 2
.1.3.6.1.2.1.9999.1.1.6.4.1.4.10.5.50.175 = INTEGER: 2
.1.3.6.1.2.1.9999.1.1.6.4.1.4.10.5.51.248 = INTEGER: 2
.1.3.6.1.2.1.9999.1.1.6.4.1.4.10.5.51.251 = INTEGER: 2
.1.3.6.1.2.1.9999.1.1.6.4.1.5.10.5.50.163 = Gauge32: 2849
.1.3.6.1.2.1.9999.1.1.6.4.1.5.10.5.50.164 = Gauge32: 3504
.1.3.6.1.2.1.9999.1.1.6.4.1.5.10.5.50.165 = Gauge32: 1426
.1.3.6.1.2.1.9999.1.1.6.4.1.5.10.5.50.175 = Gauge32: 2574
.1.3.6.1.2.1.9999.1.1.6.4.1.5.10.5.51.248 = Gauge32: 251862
.1.3.6.1.2.1.9999.1.1.6.4.1.5.10.5.51.251 = Gauge32: 87084
.1.3.6.1.2.1.9999.1.1.6.4.1.7.10.5.50.163 = INTEGER: 3
.1.3.6.1.2.1.9999.1.1.6.4.1.7.10.5.50.164 = INTEGER: 3
.1.3.6.1.2.1.9999.1.1.6.4.1.7.10.5.50.165 = INTEGER: 3
.1.3.6.1.2.1.9999.1.1.6.4.1.7.10.5.50.175 = INTEGER: 3
.1.3.6.1.2.1.9999.1.1.6.4.1.7.10.5.51.248 = INTEGER: 3
.1.3.6.1.2.1.9999.1.1.6.4.1.7.10.5.51.251 = INTEGER: 3
.1.3.6.1.2.1.9999.1.1.6.4.1.8.10.5.50.163 = Hex-STRING: 00 C6 10 B1 66 00
.1.3.6.1.2.1.9999.1.1.6.4.1.8.10.5.50.164 = Hex-STRING: 28 6A BA D3 06 3A
.1.3.6.1.2.1.9999.1.1.6.4.1.8.10.5.50.165 = Hex-STRING: 60 FA CD 85 79 1E
.1.3.6.1.2.1.9999.1.1.6.4.1.8.10.5.50.175 = Hex-STRING: 00 1F 3A A4 B3 0E
.1.3.6.1.2.1.9999.1.1.6.4.1.8.10.5.51.248 = Hex-STRING: 28 6A BA D3 06 3A
.1.3.6.1.2.1.9999.1.1.6.4.1.8.10.5.51.251 = Hex-STRING: 00 23 15 50 4C B8

So how can I get it to report the host name passed to dhcp?

Thanks,
schu

I really need this feature, and it would be trivial to add. The MIB is already in place since Mikrotik uses the existing DHCP mib, and that mib already has a spot for this:

        dhcpv4ServerClientHostName  OBJECT-TYPE
           SYNTAX      SnmpAdminString (SIZE(1..255))
           MAX-ACCESS  read-only
           STATUS      current
           DESCRIPTION
              "The host name (DHCP option 12) the client is configured to
              use, or if no host name was configured then the host name that
              the client supplied when requesting an address.  While this
              object has a maximum size of 255 octets, a Fully-Qualified
              Domain Name (FQDN) consisting of a Host Name part and a Domain
              Name part is currently limited to 255 octets.  Therefore, the
              sum of the string lengths for this object and the
              dhcpv4ServerClientDomainName MUST be, in practice, less than
              256 octets."
           ::= { dhcpv4ServerClientEntry 10 }

What is the possibility of getting this added?

Thanks,
schu