[j-nsp] COS - IP Precedence rewrite

From: Stefano Bosio (s.bosio@lutech.it)
Date: Thu Aug 09 2001 - 05:34:00 EDT


Hi,

i can set the output queue based on input interface, TOS field or
destination as in sample below (with many refuse and omissions).

but can i set the output queue or rewrite TOS based on source address or
source destination address??

If yes, how??

I try with some policy-option statement but no success.

many thanks

stefano

---------

routing-options {
    static {
        route 0.0.0.0/0 next-hop [ 192.168.250.86 192.168.250.90 ];
        route 10.12.0.0/16 next-hop 192.168.250.86;
    }
    forwarding-table {
        export [ balance cos-over ];
    }
}
policy-options {
    policy-statement balance {
        then {
            load-balance per-packet;
        }
    }
    policy-statement cos-over {
        term 1 {
            from {
                route-filter 10.12.0.0/16 exact class test-pol;
            }
            then class test-pol;
        }
    }
    policy-statement change-IP-Prec {
        term 1 {
            from {
                source-address-filter 192.168.1.0/24 orlonger;
            }
        }
    }
}
class-of-service

    input {
        precedence-map costest {
            bits 100 output-queue 1;
        }
        fpc 1 {
            precedence-map costest;
        }
        interfaces {
            so-0/0/0 {
                unit 0 {
                    output-queue 3;
                }
            }
            fe-1/1/2 {
                inet-precedence-map;
            }
        }
    }
    output {
        interfaces {
            e1-0/3/1 {
                /* configurazione del WRR per la gestione della banda */
                weighted-round-robin {
                    output-queue 0 weight 50;
                    output-queue 1 weight 15;
                    output-queue 2 weight 15;
                    output-queue 3 weight 20;
                }
                /* Conf riscrittura campo TOS */
                unit 0 {
                    precedence-rewrite {
                        output-queue 0 {
                            plp-clear rewrite-bits 111;
                            plp-set rewrite-bits 101;
                        }
                        output-queue 1 {
                            plp-set rewrite-bits 100;
                        }
                        output-queue 2 {
                            plp-clear rewrite-bits 000;
                        }
                    }
                }
            }
        }
    }
    cos-next-hop-map costest {
        output-queue 2 {
            next-hop 10.10.1.1;
        }
    }
    policy {
        class test-pol {
            classification-override {
                output-queue 2;
            }
        }
    }
}



This archive was generated by hypermail 2b29 : Mon Aug 05 2002 - 10:42:36 EDT