---
name: "SNMP::Info::IPv6"
section: "3pm"
platform: "linux"
package: "libsnmp-info-perl"
version: "3.972002-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SNMP::Info::IPv6"
---

# SNMP::Info::IPv6(3pm)

SNMP Interface for obtaining IPv6 addresses and IPv6 address mappings

## NAME

SNMP::Info::IPv6 - SNMP Interface for obtaining IPv6 addresses and IPv6 address mappings

## AUTHOR

Jeroen van Ingen and Carlos Vicente

## SYNOPSIS

```
 # Let SNMP::Info determine the correct subclass for you.
 my $info = new SNMP::Info(
                          AutoSpecify => 1,
                          Debug       => 1,
                          DestHost    => 'myswitch',
                          Community   => 'public',
                          Version     => 2
                        )
    or die "Can't connect to DestHost.\n";
 my $class      = $info->class();
 print "SNMP::Info determined this device to fall under subclass : $class\n";
```

## DESCRIPTION

The SNMP::Info::IPv6 class implements functions for mapping IPv6 addresses to MAC addresses, interfaces and more. It will use data from the *IP-MIB*, *IPV6-MIB*, or the *CISCO-IETF-IP-MIB*, whichever is supported by the device.

This class is inherited by Info::Layer3 to provide IPv6 node tracking across device classes.

For debugging purposes you can call this class directly as you would SNMP::Info

```
 my $info = SNMP::Info::IPv6->new(...);
```

### Inherited Classes

none.

### Required MIBs

- *IP-MIB*

  - *IPV6-MIB*

  - *CISCO-IETF-IP-MIB*

  ## GLOBALS

none.

## TABLE METHODS

These are methods that return tables of information in the form of a reference to a hash.

### Internet Address Table

- $info-\>**ipv6\_n2p\_addr()**

  - $info-\>**ipv6\_n2p\_if()**

  - $info-\>**ipv6\_n2p\_mac()**

  - $info-\>**ipv6\_n2p\_state()**

  - $info-\>**ipv6\_n2p\_type()**

  - $info-\>**ipv6\_index()**

  Maps an IPv6 address to an interface `"ifIndex"`

- $info-\>**ipv6\_type()**

  Maps an IPv6 address to its type (unicast, anycast, etc.)

- $info-\>**ipv6\_pfx\_origin()**

  Maps an IPv6 prefix with its origin (manual, well-known, dhcp, etc.)

- $info-\>**ipv6\_addr\_prefix()**

  Maps IPv6 addresses with their prefixes

- $info-\>**ipv6\_addr\_prefixlength()**

  Maps IPv6 addresses with their prefix length

- $info-\>**ipv6\_addr()**

  Maps a table instance to an IPv6 address

### Internet Address Translation Table

- $info-\>**c\_inet\_phys\_address()**

  Maps an address of type `"cInetNetToMediaNetAddressType"` on interface `"ifIndex"` to a physical address.

## MUNGES

- **munge\_physaddr()**

  Takes an octet stream (HEX-STRING) and returns a colon separated ASCII hex string.

- parse\_inetaddress

  Parses an InetAddress as defined by INET-ADDRESS-MIB.

  Returns a hashref with the type as defined by InetAddressType, the textual address and optionally the zone\_identifier.
