Port Mirroring Junos

Home » Blog » Configuration Template » Juniper » Port Mirroring Junos

Port Mirroring Junos

07.02 2024 | by massimiliano

Il port mirroring è utile per esaminare: pacchetti in entrata o in uscita da una porta pacchetti in entrata su […]



Il port mirroring è utile per esaminare:

pacchetti in entrata o in uscita da una porta

pacchetti in entrata su base vlan

pacchetti in uscita su base vlan (valido solo per EX8200)

Pacchetti in entrata su una porta oppure su una vlan che sono selezionati da un «firewall filter», ossia pacchetti che attraversano un filtro in ingresso e vengono inviati ad un analyzer; questo ultimo può essere locale ad uno switch (local analyzer port) oppure d uno switch remoto (analyzer vlan) 

Nota: è possibile campionare i pacchetti da replicare, ad esempio con un ratio = 200 (significa 1 pacchetto su 200)

LOCAL ANALYZER PORT:

root@SW1# edit ethernet-switching options analyzer TEST

[edit ethernet-switching options analyzer TEST]

root@SW1# set input ingress interface ge-0/0/4.0

root@SW1# set input egress interface ge-0/0/6.0

root@SW1# set output interface ge-0/0/10.0

REMOTE ANALYZER PORT:

root@SW1# edit ethernet-switching options analyzer TEST

[edit ethernet-switching options analyzer TEST]

root@SW1# set input ingress interface ge-0/0/4.0

root@SW1# set input egress interface ge-0/0/4.0

root@SW1# set loss-priority high  # di default la loss-priority è con valore low; in caso di output vlan bisogna mettere secondo best-practice high

root@SW1# set output vlan remote-analyzer

root@SW1# set vlans remote-analyzer vlan-id 10

root@SW1# set interface ge-0/0/24.0 family ethernet-switching port-mode trunk

root@SW1# set interface ge-0/0/24.0 family ethernet-switching vlan members 10

!

root@SW2# edit ethernet-switching options analyzer TEST

root@SW2# set input ingress vlan remote-analyzer

root@SW2# set output interface ge-0/0/20.0

root@SW2# set vlans remote-analyzer vlan-id 10

root@SW2# set interface ge-0/0/24.0 family ethernet-switching port-mode trunk

root@SW2# set interface ge-0/0/24.0 family ethernet-switching vlan members 10

!

Torna in alto