Description

This article explains the message displayed during flow monitoring configuration: "Warning: Template type must match input protocol"
 

Symptoms

When configuring flow monitoring, the message "Warning: Template type must match input protocol" is displayed in the following format when the show forwarding-options command is issued in configuration mode:

forwarding-options {
    sampling {
        instance {
            sampling_flow {
                input {
                    rate 1;
                }
                family inet {
                    output {
                        flow-server 192.168.0.10{
                            port 9887;
                            version-ipfix {
                                template {
                                    ##
                                    ## Warning: Template type must match input protocol
                                    ##
                                    IPv4;
                                }
                            }
                        }
                        inline-jflow {
                            source-address 192.168.0.1;
                        }
                    }
                }
           }
       }
   }
}

Solution

The above example configuration is valid syntax and configuration structure. However, this message will be persistently displayed as indicated above when the version-ipfix template <address_family> <template_type> is undefined under the [edit services flow-monitoring] hierarchy.

To clear this warning, configure the services flow-monitoring version-ipfix template to the appropriate address family and template type. An example configuration is below:

JTAC@R1-re0# set services flow-monitoring version-ipfix template IPv4 ?
Possible completions:
+ apply-groups Groups from which to inherit configuration data
+ apply-groups-except Don't inherit configuration data from these groups
flow-active-timeout Interval after which active flow is exported (10..600)
flow-inactive-timeout Period of inactivity that marks a flow inactive (10..600)
> ipv4-template IPv4 template configuration
> option-refresh-rate Option template refresh rate
> template-refresh-rate Template refresh rate
[edit]
JTAC@R1-re0# set services flow-monitoring version-ipfix template IPv4 ipv4-template

JTAC@R1-re0# show services

    flow-monitoring {
        version-ipfix {
            template IPv4 {
                ipv4-template;
            }
        }
    }
}

JTAC@R1-re0# show forwarding-options
forwarding-options {
    sampling {
        instance {
            sampling_flow {
                input {
                    rate 1;
                }
                    family inet {
                        output {
                            flow-server 192.168.0.10 {
                            port 9887;
                            version-ipfix {
                                template {
                                    IPv4;
                                }
                            }
                        }
                        inline-jflow {
                            source-address 192.168.0.1;
                        }
                    }
                }
            }
        }
    }
}

JTAC@R1-re0# commit check
configuration check succeeds

Modification History

2022-10-20: Updated IP addresses to comply with RFC1918