Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
external-header-nav
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Example: Configuring Active Monitoring on an M, MX or T Series Router’s Logical System

date_range 13-Jan-21

This example shows a sample configuration that allows you to configure active monitoring on a logical M-series, MX-series, T-series, or PTX Series system.

The following section shows the configuration on the primary router:

content_copy zoom_out_map
[edit forwarding-options]
sampling {
    instance inst1 {
        input {
            rate 1;
        }
        family inet;
            output {
                flow-server 198.51.100.2 {
                    port 2055;
                    version9 {
                        template {
                            ipv4;
                        }
                    }
                }
            }
            interface sp-0/1/0 {
                source-address 10.11.12.13;
            }
        }
    }
    family mpls;
        output {
            flow-server 198.51.100.2 {
                port 2055;
                version9 {
                    template {
                        mpls;
                    }
                }
            }
        }
        interface sp-0/1/0 {
            source-address 10.11.12.13;
        }
    }
}
services {
    flow-monitoring {
        version9 {
            template ipv4 {
                flow-active-timeout 60;
                flow-inactive-timeout 60;
                ipv4-template;
                template-refresh-rate {
                    packets 1000;
                    seconds 10;
                }
                option-refresh-rate {
                    packets 1000;
                    seconds 10;
                }
            }
            template mpls {
                mpls-template;
            }
        }
    }
}

The configuration for the logical router uses the input parameters and the output interface for sampling from the primary router. Each logical router should have separate template definitions for the flow-server configuration. The following section shows the configuration on the logical router:

content_copy zoom_out_map
logical-systems {
    ls-1 {
        firewall {
            family inet { 
                filter test-sample {
                    term term-1 {
                        then {
                            sample;
                            accept;
                        }
                    }
                }
            }
        }
        interfaces {
            ge-0/0/1 {
                unit 0 {
                    family inet {
                        filter {
                            input test-sample;
                            output test-sample;
                        }
                    }
                }
            }
        }
        forwarding-options {
            sampling {
                instance sample-inst1 {
                    family inet;
                        output {
                            flow-server 198.51.100.2 {
                                port 2055;
                                version9 {
                                    template {
                                        ipv4-ls1;
                                    }
                                }
                            }
                        }
                    }
                }
                family mpls;
                    output {
                        flow-server 198.51.100.2 {
                            port 2055;
                            version9 {
                                template {
                                    mpls-ls1;
                                }
                            }
                        }
                    }
                }
            }
        }
        services {
            flow-monitoring {
                version9 {
                    template ipv4-ls1 {
                        flow-active-timeout 60;
                        flow-inactive-timeout 60;
                        ipv4-template;
                        template-refresh-rate {
                            packets 1000;
                            seconds 10;
                        }
                        option-refresh-rate {
                            packets 1000;
                            seconds 10;
                        }
                    }
                    template mpls-ls1 {
                        mpls-template;
                    }
                }
            }
        }
    }
}
external-footer-nav