Net::SNMP::HostInfo::IpRouteEntry - An entry in the ipRouteTable of a MIB-II host
|
Net::SNMP::HostInfo::IpRouteEntry - An entry in the ipRouteTable of a MIB-II host
use Net::SNMP::HostInfo;
$host = shift || 'localhost';
$hostinfo = Net::SNMP::HostInfo->new(Hostname => $host);
print "\nRoute Table:\n";
printf "%-15s %-15s %-15s %-11s %-10s %-3s %-3s\n",
qw/Dest Mask NextHop Type Proto If Cost/;
for $route ($hostinfo->ipRouteTable) {
printf "%-15s %-15s %-15s %-11s %-10s %-3s %-3s\n",
$route->ipRouteDest,
$route->ipRouteMask,
$route->ipRouteNextHop,
$route->ipRouteType,
$route->ipRouteProto,
$route->ipRouteIfIndex,
$route->ipRouteMetric1;
}
``A route to a particular destination.''
- ipRouteDest
-
``The destination IP address of this route. An
entry with a value of 0.0.0.0 is considered a
default route. Multiple routes to a single
destination can appear in the table, but access to
such multiple entries is dependent on the table-
access mechanisms defined by the network
management protocol in use.''
- ipRouteIfIndex
-
``The index value which uniquely identifies the
local interface through which the next hop of this
route should be reached. The interface identified
by a particular value of this index is the same
interface as identified by the same value of
ifIndex.''
- ipRouteMetric1
-
``The primary routing metric for this route. The
semantics of this metric are determined by the
routing-protocol specified in the route's
ipRouteProto value. If this metric is not used,
its value should be set to -1.''
- ipRouteMetric2
-
``An alternate routing metric for this route. The
semantics of this metric are determined by the
routing-protocol specified in the route's
ipRouteProto value. If this metric is not used,
its value should be set to -1.''
- ipRouteMetric3
-
``An alternate routing metric for this route. The
semantics of this metric are determined by the
routing-protocol specified in the route's
ipRouteProto value. If this metric is not used,
its value should be set to -1.''
- ipRouteMetric4
-
``An alternate routing metric for this route. The
semantics of this metric are determined by the
routing-protocol specified in the route's
ipRouteProto value. If this metric is not used,
its value should be set to -1.''
- ipRouteNextHop
-
``The IP address of the next hop of this route.
(In the case of a route bound to an interface
which is realized via a broadcast media, the value
of this field is the agent's IP address on that
interface.)''
- ipRouteType
-
``The type of route. Note that the values
direct(3)
and indirect(4)
refer to the notion of
direct and indirect routing in the IP
architecture.
-
Setting this object to the value invalid(2)
has
the effect of invalidating the corresponding entry
in the ipRouteTable object. That is, it
effectively dissasociates the destination
identified with said entry from the route
identified with said entry. It is an
implementation-specific matter as to whether the
agent removes an invalidated entry from the table.
Accordingly, management stations must be prepared
to receive tabular information from agents that
corresponds to entries not currently in use.
Proper interpretation of such entries requires
examination of the relevant ipRouteType object.``
-
Possible values are:
-
other(1),
invalid(2),
direct(3),
indirect(4)
- ipRouteProto
-
``The routing mechanism via which this route was
learned. Inclusion of values for gateway routing
protocols is not intended to imply that hosts
should support those protocols.''
-
Possible values are:
-
other(1),
local(2),
netmgmt(3),
icmp(4),
egp(5),
ggp(6),
hello(7),
rip(8),
is-is(9),
es-is(10),
ciscoIgrp(11),
bbnSpfIgp(12),
ospf(13),
bgp(14)
- ipRouteAge
-
``The number of seconds since this route was last
updated or otherwise determined to be correct.
Note that no semantics of `too old' can be implied
except through knowledge of the routing protocol
by which the route was learned.''
- ipRouteMask
-
``Indicate the mask to be logical-ANDed with the
destination address before being compared to the
value in the ipRouteDest field. For those systems
that do not support arbitrary subnet masks, an
agent constructs the value of the ipRouteMask by
determining whether the value of the correspondent
ipRouteDest field belong to a class-A, B, or C
network, and then using one of:
-
mask network
255.0.0.0 class-A
255.255.0.0 class-B
255.255.255.0 class-C
-
If the value of the ipRouteDest is 0.0.0.0 (a
default route), then the mask value is also
0.0.0.0. It should be noted that all IP routing
subsystems implicitly use this mechanism.``
- ipRouteMetric5
-
``An alternate routing metric for this route. The
semantics of this metric are determined by the
routing-protocol specified in the route's
ipRouteProto value. If this metric is not used,
its value should be set to -1.''
- ipRouteInfo
-
``A reference to MIB definitions specific to the
particular routing protocol which is responsible
for this route, as determined by the value
specified in the route's ipRouteProto value. If
this information is not present, its value should
be set to the OBJECT IDENTIFIER { 0 0 }, which is
a syntatically valid object identifier, and any
conformant implementation of ASN.1 and BER must be
able to generate and recognize this value.''
James Macfarlane, <jmacfarla@cpan.org>
Net::SNMP::HostInfo
Net::SNMP::HostInfo::IpRouteEntry - An entry in the ipRouteTable of a MIB-II host
|