Exemplo: Configuração de aulas de encaminhamento
Por padrão em todas as plataformas, quatro filas de saída são mapeadas para quatro FCs, conforme mostrado na visão geral das aulas de encaminhamento. Em dispositivos da Juniper Networks, você pode configurar até oito FCs e oito filas.
Para configurar até oito FCs, inclua a declaração de fila no nível de hierarquia [editar classes de encaminhamento de serviço] :
[edit class-of-service forwarding-classes] queue queue-number class-name;
O número da fila de saída pode ser de 0 a 7, e você deve mapear as classes de encaminhamento um a um com as filas de saída. A taxa de transmissão de agendador padrão e as porcentagens de tamanho de buffer para filas de 0 a 7 são de 95, 0, 0, 5, 0, 0, 0 e 0%, respectivamente.
Por exemplo, para configurar um mapeamento de um a um entre oito FCs e oito filas, você usaria a seguinte configuração:
[edit class-of-service] forwarding-classes { queue 0 be; queue 1 ef; queue 2 af; queue 3 nc; queue 4 ef1; queue 5 ef2; queue 6 af1; queue 7 nc1; }
Definição de oito classificadores
[edit class-of-service] classifiers { dscp dscp-table { forwarding-class ef { loss-priority low code-points [101000, 101001]; loss-priority high code-points [101010, 101011]; } forwarding-class af { loss-priority low code-points [010000, 010001]; loss-priority high code-points [010010, 010011]; } forwarding-class be { loss-priority low code-points [000000]; } forwarding-class nc { loss-priority low code-points [111000]; } forwarding-class ef1 { loss-priority low code-points [101100, 101101]; loss-priority high code-points [101110]; } forwarding-class af1 { loss-priority high code-points [101110]; } forwarding-class ef2 { loss-priority low code-points [101111]; } forwarding-class nc1 { loss-priority low code-points [111001]; } } }
Incluir oito agendadores em um mapa de agendamento
Configure um mapa de agendador personalizado que se aplica globalmente a todas as interfaces, exceto aquelas que ficam restritas a quatro filas:
[edit class-of-service] scheduler-maps { sched { forwarding-class be scheduler Q0; forwarding-class ef scheduler Q1; forwarding-class af scheduler Q2; forwarding-class nc scheduler Q3; forwarding-class ef1 scheduler Q4; forwarding-class ef2 scheduler Q5; forwarding-class af1 scheduler Q6; forwarding-class nc1 scheduler Q7; } } schedulers { Q0 { transmit-rate percent 25; buffer-size percent 25; priority low; drop-profile-map loss-priority any protocol both drop-default; } Q1 { buffer-size temporal 2000; priority strict-high; drop-profile-map loss-priority any protocol both drop-ef; } Q2 { transmit-rate percent 35; buffer-size percent 35; priority low; drop-profile-map loss-priority any protocol both drop-default; } Q3 { transmit-rate percent 5; buffer-size percent 5; drop-profile-map loss-priority any protocol both drop-default; } Q4 { transmit-rate percent 5; priority high; drop-profile-map loss-priority any protocol both drop-ef; } Q5 { transmit-rate percent 10; priority high; drop-profile-map loss-priority any protocol both drop-ef; } Q6 { transmit-rate remainder; priority low; drop-profile-map loss-priority any protocol both drop-default; } Q7 { transmit-rate percent 5; priority high; drop-profile-map loss-priority any protocol both drop-default; } }
Configuração de tabelas de classificação e reescrita de precedência de IP
[edit class-of-service] classifiers { inet-precedence inet-classifier { forwarding-class be { loss-priority low code-points 000; } forwarding-class af11 { loss-priority high code-points 001; } forwarding-class ef { loss-priority low code-points 010; } forwarding-class nc1 { loss-priority high code-points 011; } forwarding-class be1 { loss-priority low code-points 100; } forwarding-class af12 { loss-priority high code-points 101; } forwarding-class ef1 { loss-priority low code-points 110; } forwarding-class nc2 { loss-priority high code-points 111; } } } exp exp-rw-table { forwarding-class be { loss-priority low code-point 000; } forwarding-class af11 { loss-priority high code-point 001; } forwarding-class ef { loss-priority low code-point 010; } forwarding-class nc1 { loss-priority high code-point 111; } forwarding-class be1 { loss-priority low code-point 100; } forwarding-class af12 { loss-priority high code-point 101; } forwarding-class ef1 { loss-priority low code-point 110; } forwarding-class nc2 { loss-priority low code-point 111; } } inet-precedence inet-rw-table { forwarding-class be { loss-priority low code-point 000; } forwarding-class af11 { loss-priority high code-point 001; } forwarding-class ef { loss-priority low code-point 010; } forwarding-class nc1 { loss-priority low code-point 111; } forwarding-class be1 { loss-priority low code-point 100; } forwarding-class af12 { loss-priority high code-point 101; } forwarding-class ef1 { loss-priority low code-point 110; } forwarding-class nc2 { loss-priority low code-point 111; } }
Configuração de uma política de IDP com uma classe de encaminhamento
Configure uma política de IDP com uma classe de encaminhamento como uma ação para reescrever os valores de DSCP de pacotes IP:
[edit class-of-service] security idp idp-policy policy_name rulebase-ips rule rule_name { then { action { class-of-service { forwarding-class forwarding-class-name; dscp-code-point value; } } } }