The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Device::Firewall::PaloAlto::Op::Route - Palto Alto firewall route

VERSION

version 0.1.9

SYNOPSIS

    my $default_route = $fw->op->virtual_router('vr_guest')->route('0.0.0.0/0');
    say "Protocol: ".$default_route->protocol;

DESCRIPTION

This object represents a route from a Palo Alto's virtual route table.

METHODS

destination

Returns the destination subnet of the route.

next_hops

Returns a list of hashrefs, one for each next-hop. There will more than one next-hop if the route is an ECMP route.

The below is an example HASHREF

    {
        'ip' => '1.1.5.2',
        'age' => '8008',
        'vr' => '',
        'discard' => '',
        'interface' => 'ethernet1/1'
    }

The next-hop of the route can either be an IP address, another virtual router on the firewall, or a discard route. Only one of these keys in the hash will be set, the others will be set to the empty string.

protocol

Returns the protocol that the route was learnt through. Can be one of 'host', 'connected', 'static', 'rip', 'ospf' or 'bgp'

protocol_flags

Returns a list of routing protocol flags for the route. Examples include OSPF inter- or intra-area routes, or BGP internal routes.

If there are no flags, an empty list is returned.

The flags set are dependent on the routing protocol that the route was learnt from.

active

Returns 1 if the route is active, or 0 if the route is not active.

ecmp

Returns 1 if the route is ECMP, or 0 if it is not.

AUTHOR

Greg Foletta <greg@foletta.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2019 by Greg Foletta.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.