Traffic matching an IP filter can be tunneled with GRE using the following mechanisms.
Configure a GRE tunnel template.
Associate the GRE tunnel template with the forwarding action of an IPv4 or IPv6 filter using the forward gre-tunnel gre-tunnel-template command.
The gre-tunnel-template defines the parameters to create the GRE header used to encapsulate matching IP traffic.
One or more destination IP addresses must be defined in the gre-tunnel-template.
If more than one destination is configured, then traffic is hashed across all available destinations.
Traffic is routed to the selected destination address based on the route table in the forwarding context of the IP filter.
The source address can be configured to any value and is not validated against a local IP address on the local router.
The optional gre-key field can be populated with the ifIndex of the ingress interface on which the matching IP packet was received.
An optional template parameter, skip-ttl-decrement, allows the TTL of the encapsulated IP packet to be not decremented when encapsulated into the GRE header.
The following is an example configuration:
*A:Nokia-C>config>filter>ip-filter$ default-action
gre-tunnel-template "test" create
description "10.20.1.5"
ipv4
source-address 10.20.1.3
destination-address 9.9.9.9
destination-address 10.20.1.5
destination-address 13.13.13.13
exit
exit
ip-filter 1 name "1" create
entry 1 create
action
exit
pbr-down-action-override forward
exit
entry 2 create
action
forward gre-tunnel "test"
exit
exit
exit