Clasificación. OER Filter Keys

Estaremos trabajando ahora para la agrupación por aplicación. Se verá que depende de como se configure, podría generar varios prefijos para la misma aplicación.
Tomemos como referencia el siguiente diagrama:

oer_diagram1.JPG

Te recomendamos que leas oer-filter para entender la parte de filtros.

OER / PfR tiene la capacidad de trabajar encima de los parámetros filtrados, agruparlos de la siguiente manera:

Rack1R2(config-oer-mc-learn)#traffic-class keys ?
  default   Learn top appls based on protocol and dst port
  dport     Learn top appls based on destination port
  dscp      Learn top appls based on DSCP
  protocol  Learn top appls based on protocol
  sport     Learn top appls based on source port
  <cr>

En este caso utilizaremos el filtrado por protocolo con puerto de origen. Desde el ISP1 el tráfico es generado de la siguiente manera:

Rack1R6#show run | sec ip sla
ip sla 2
 udp-jitter 150.1.8.8 16384 source-ip 150.1.6.6 codec g729a codec-numpackets 10 codec-interval 10
 threshold 100
ip sla schedule 2 life forever start-time now
Rack1R6#

La configuración queda de la siguiente manera:

oer master
logging
 learn
  throughput
  protocol 1
  periodic-interval 1
  monitor-period 1
  traffic-class filter access-list UDP_TRAFFIC
  traffic-class keys protocol sport

ip access-list extended UDP_TRAFFIC
 permit udp any any

Dato: traffic-class filter, traffic-class aggregate y traffic-class key pueden trabajar juntos los tres.
Dato: si activas un traffic-class keys, los prefijos son agrupados por aplicaciones. PfR controla las aplicaciones solo con PBR.
Dato: Aunque esto pertenece a la etapa de control, hay que saber que si la condicion PBR no es satisfecha, no es posible controlarlo. Puedes saber si cumple, con el comando show oer master casi al inicio, donde indica "PBR Requirements not met":

OER state: ENABLED and ACTIVE
  Conn Status: SUCCESS, PORT: 3949
  Version: 2.2
  Number of Border routers: 3
  Number of Exits: 4
  Number of monitored prefixes: 5 (max 5000)
  Max prefixes: total 5000 learn 2500
  Prefix count: total 5, learn 3, cfg 0
  PBR Requirements not met
  Nbar Status: Inactive
...

Dato: este tipo de filtro no funciona con el comando delay. Si se trata de activar salen los siguientes mensajes de alerta:

Rack1R2(config-oer-mc-learn)#delay 
% Configuring delay for Learn will disable learning of traffic-classes/applications

Luego de esperar el tiempo de monitoreo, observamos los prefijos aprendidos en el MC, pero no aparece ningún tráfico aprendido bajo el comando show oer master prefix:

Rack1R2#  show oer master prefix

Rack1R2#

La razón es que ahora los prefijos son vistos como aplicación. Para poder ver esta clase de prefijos aprendidos por aplicación utilizar los comandos show oer master appl y show oer master traffic-class:
Rack1R2#show oer master appl
OER Prefix Statistics:
 Pas - Passive, Act - Active, S - Short term, L - Long term, Dly - Delay (ms),
 P - Percentage below threshold, Jit - Jitter (ms), 
 MOS - Mean Opinion Score
 Los - Packet Loss (packets-per-million), Un - Unreachable (flows-per-million),
 E - Egress, I - Ingress, Bw - Bandwidth (kbps), N - Not applicable
 U - unknown, * - uncontrolled, + - control more specific, @ - active probe all
 # - Prefix monitor mode is Special, & - Blackholed Prefix
 % - Force Next-Hop, ^ - Prefix is denied

Prefix                Prot Port [src][dst]/ApplId        DSCP Source Prefix     
                          State     Time Curr BR         CurrI/F         Protocol
                        PasSDly  PasLDly   PasSUn   PasLUn  PasSLos  PasLLos
                        ActSDly  ActLDly   ActSUn   ActLUn      EBw      IBw
                        ActSJit  ActPMOS
--------------------------------------------------------------------------------
150.1.6.0/24           udp [1967, 1967] [1, 65535]       defa 0.0.0.0/0         
                       DEFAULT*        0 U               U               U       
150.1.6.0/24           udp [16384, 16384] [1, 65535]     defa 0.0.0.0/0         
                       DEFAULT*        0 U               U               U       
Rack1R2#show oer master traffic-class
*Oct 25 18:14:48.867: %OER_MC-5-NOTICE: Discovered Exit for Appl Prefix 150.1.6.0/24 defa 17 [1967, 1967] [1, 65535], BR 150.1.5.5, i/f Se0/1/0 
*Oct 25 18:14:48.867: %OER_MC-5-NOTICE: Discovered Exit for Appl Prefix 150.1.6.0/24 defa 17 [16384, 16384] [1, 65535], BR 150.1.5.5, i/f Se0/1/0 
Rack1R2#show oer master traffic-class
OER Prefix Statistics:
 Pas - Passive, Act - Active, S - Short term, L - Long term, Dly - Delay (ms),
 P - Percentage below threshold, Jit - Jitter (ms), 
 MOS - Mean Opinion Score
 Los - Packet Loss (packets-per-million), Un - Unreachable (flows-per-million),
 E - Egress, I - Ingress, Bw - Bandwidth (kbps), N - Not applicable
 U - unknown, * - uncontrolled, + - control more specific, @ - active probe all
 # - Prefix monitor mode is Special, & - Blackholed Prefix
 % - Force Next-Hop, ^ - Prefix is denied

DstPrefix           Appl_ID Dscp Prot     SrcPort     DstPort SrcPrefix         
           Flags             State     Time            CurrBR  CurrI/F Protocol
         PasSDly  PasLDly   PasSUn   PasLUn  PasSLos  PasLLos      EBw      IBw
         ActSDly  ActLDly   ActSUn   ActLUn  ActSJit  ActPMOS  ActSLos  ActLLos
--------------------------------------------------------------------------------
150.1.6.0/24              N defa  udp   1967-1967     1-65535 0.0.0.0/0         
                          DEFAULT*        0         150.1.5.5  Se0/1/0        U
               U        U        0        0        0        0        1        0
               U        U        0        0        N        N        N        N

150.1.6.0/24              N defa  udp 16384-16384     1-65535 0.0.0.0/0         
                          DEFAULT*        0         150.1.5.5  Se0/1/0        U
               U        U        0        0        0        0        1        0
               U        U        0        0        N        N        N        N

Rack1R2#

Observen que los prefijos fueron ordenados basados por el puerto de origen. Al parecer el ip sla genera tráfico utilizando el puerto origen 1967 y 16384 desde la perspectiva de adentro.

Ahora cambiemos que agrupo por puerto destino:

Rack1R2#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Rack1R2(config)#oer master
Rack1R2(config-oer-mc)#learn
Rack1R2(config-oer-mc-learn)#traffic-class keys protocol dport 
Rack1R2(config-oer-mc-learn)#end
Rack1R2#

Limpiamos la tabla con clear oer master o darle shutdown en modo oer master. Luego de eso verficamos nuevamente y vemos que lo agrupa ahora por puerto destino.

Rack1R2#show oer master appl
OER Prefix Statistics:
 Pas - Passive, Act - Active, S - Short term, L - Long term, Dly - Delay (ms),
 P - Percentage below threshold, Jit - Jitter (ms), 
 MOS - Mean Opinion Score
 Los - Packet Loss (packets-per-million), Un - Unreachable (flows-per-million),
 E - Egress, I - Ingress, Bw - Bandwidth (kbps), N - Not applicable
 U - unknown, * - uncontrolled, + - control more specific, @ - active probe all
 # - Prefix monitor mode is Special, & - Blackholed Prefix
 % - Force Next-Hop, ^ - Prefix is denied

Prefix                Prot Port [src][dst]/ApplId        DSCP Source Prefix     
                          State     Time Curr BR         CurrI/F         Protocol
                        PasSDly  PasLDly   PasSUn   PasLUn  PasSLos  PasLLos
                        ActSDly  ActLDly   ActSUn   ActLUn      EBw      IBw
                        ActSJit  ActPMOS
--------------------------------------------------------------------------------
150.1.6.0/24           udp [1, 65535] [53500, 53500]     defa 0.0.0.0/0         
                       DEFAULT*        0 150.1.5.5       Se0/1/0         U       
                              U        U        0        0        0        0
                              U        U        0        0        1        0
                              N        N
150.1.6.0/24           udp [1, 65535] [55688, 55688]     defa 0.0.0.0/0         
                       DEFAULT*        0 150.1.5.5       Se0/1/0         U       
                              U        U        0        0        0        0
                              U        U        0        0        1        0
                              N        N
150.1.6.0/24           udp [1, 65535] [53565, 53565]     defa 0.0.0.0/0         
                       DEFAULT*        0 150.1.5.5       Se0/1/0         U       
                              U        U        0        0        0        0
                              U        U        0        0        0        0
                              N        N
150.1.6.0/24           udp [1, 65535] [55355, 55355]     defa 0.0.0.0/0         
                       DEFAULT*        0 150.1.5.5       Se0/1/0         U       
                              U        U        0        0        0        0
                              U        U        0        0        0        0
                              N        N
Rack1R2#
Rack1R2#
Rack1R2#
Rack1R2#
*Oct 25 18:29:14.702: %OER_MC-5-NOTICE: Prefix Learning WRITING DATA
Rack1R2#
Rack1R2#show oer master traffic-class
OER Prefix Statistics:
 Pas - Passive, Act - Active, S - Short term, L - Long term, Dly - Delay (ms),
 P - Percentage below threshold, Jit - Jitter (ms), 
 MOS - Mean Opinion Score
 Los - Packet Loss (packets-per-million), Un - Unreachable (flows-per-million),
 E - Egress, I - Ingress, Bw - Bandwidth (kbps), N - Not applicable
 U - unknown, * - uncontrolled, + - control more specific, @ - active probe all
 # - Prefix monitor mode is Special, & - Blackholed Prefix
 % - Force Next-Hop, ^ - Prefix is denied

DstPrefix           Appl_ID Dscp Prot     SrcPort     DstPort SrcPrefix         
           Flags             State     Time            CurrBR  CurrI/F Protocol
         PasSDly  PasLDly   PasSUn   PasLUn  PasSLos  PasLLos      EBw      IBw
         ActSDly  ActLDly   ActSUn   ActLUn  ActSJit  ActPMOS  ActSLos  ActLLos
--------------------------------------------------------------------------------
150.1.6.0/24              N defa  udp     1-65535 53989-53989 0.0.0.0/0         
                          DEFAULT*        0         150.1.5.5  Se0/1/0        U

150.1.6.0/24              N defa  udp     1-65535 53500-53500 0.0.0.0/0         
                          DEFAULT*        0         150.1.5.5  Se0/1/0        U
               U        U        0        0        0        0        1        0
               U        U        0        0        N        N        N        N

150.1.6.0/24              N defa  udp     1-65535 55688-55688 0.0.0.0/0         
                          DEFAULT*        0         150.1.5.5  Se0/1/0        U
               U        U        0        0        0        0        1        0
               U        U        0        0        N        N        N        N

150.1.6.0/24              N defa  udp     1-65535 53565-53565 0.0.0.0/0         
                          DEFAULT*        0         150.1.5.5  Se0/1/0        U
               U        U        0        0        0        0        0        0
               U        U        0        0        N        N        N        N

150.1.6.0/24              N defa  udp     1-65535 55355-55355 0.0.0.0/0         
                          DEFAULT*        0         150.1.5.5  Se0/1/0        U
               U        U        0        0        0        0        0        0
               U        U        0        0        N        N        N        N

Podemos ver que como puerto destino (desde la perspectiva de dentro hacia fuera) utiliza puertos aleatorios como 53989, 53500, 55688, 53565 y 55355 para la misma aplicación analizada en el inicio.

Hacemos una última prueba donde lo cambiamos ahora a traffic-class keys dscp. Vemos que lo agrupa por dscp.

Rack1R2#show oer master appl
OER Prefix Statistics:
 Pas - Passive, Act - Active, S - Short term, L - Long term, Dly - Delay (ms),
 P - Percentage below threshold, Jit - Jitter (ms), 
 MOS - Mean Opinion Score
 Los - Packet Loss (packets-per-million), Un - Unreachable (flows-per-million),
 E - Egress, I - Ingress, Bw - Bandwidth (kbps), N - Not applicable
 U - unknown, * - uncontrolled, + - control more specific, @ - active probe all
 # - Prefix monitor mode is Special, & - Blackholed Prefix
 % - Force Next-Hop, ^ - Prefix is denied

Prefix                Prot Port [src][dst]/ApplId        DSCP Source Prefix     
                          State     Time Curr BR         CurrI/F         Protocol
                        PasSDly  PasLDly   PasSUn   PasLUn  PasSLos  PasLLos
                        ActSDly  ActLDly   ActSUn   ActLUn      EBw      IBw
                        ActSJit  ActPMOS
--------------------------------------------------------------------------------
150.1.6.0/24           256 N        N                    defa 0.0.0.0/0         
                       DEFAULT*        0 U               U               U       
Rack1R2# show oer master traffic-class
OER Prefix Statistics:
 Pas - Passive, Act - Active, S - Short term, L - Long term, Dly - Delay (ms),
 P - Percentage below threshold, Jit - Jitter (ms), 
 MOS - Mean Opinion Score
 Los - Packet Loss (packets-per-million), Un - Unreachable (flows-per-million),
 E - Egress, I - Ingress, Bw - Bandwidth (kbps), N - Not applicable
 U - unknown, * - uncontrolled, + - control more specific, @ - active probe all
 # - Prefix monitor mode is Special, & - Blackholed Prefix
 % - Force Next-Hop, ^ - Prefix is denied

DstPrefix           Appl_ID Dscp Prot     SrcPort     DstPort SrcPrefix         
           Flags             State     Time            CurrBR  CurrI/F Protocol
         PasSDly  PasLDly   PasSUn   PasLUn  PasSLos  PasLLos      EBw      IBw
         ActSDly  ActLDly   ActSUn   ActLUn  ActSJit  ActPMOS  ActSLos  ActLLos
--------------------------------------------------------------------------------
150.1.6.0/24              N defa  256           N           N 0.0.0.0/0         
                          DEFAULT*        0         150.1.5.5  Se0/1/0        U

Rack1R2#
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License