cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Etc


Reference














.

hardware:junos:traffice-monitor



How to monitor traffic on Junos SRX

monitor traffic command Examples

Only packets sent from SRX can be captured

> monitor traffic interface vlan.10
> monitor traffic interface ge-0/0/0.0
> monitor traffic interface vlan.10 matching "host 192.168.0.1 && udp && port 9997"

How to use capture file

>monitor traffic interface ge-0/0/0.0 write-file test.pcap
>monitor traffic read-file test.pcap




How to use tcpdump command on SRX

Only packets sent from SRX can be captured

(1) change to root user

> start shell user root
% whoami
root

or

> start shell
% su
% whoami
root

(2) tcpdump Examples

% tcpdump -i ge-0/0/0
% tcpdump -i vlan.199
% tcpdump -r /var/tmp/test-cap
% tcpdump -n host 192.168.0.1 and udp and port 9997


traffic log

# set system syslog file traffic-log any any
# set system syslog file traffic-log match "RT_FLOW_SESSION"
set security policies from-zone XXX to-zne XXX policy XXXX match source-address XXXXX
set security policies from-zone XXX to-zne XXX policy XXXX match destination-address XXXXX
set security policies from-zone XXX to-zne XXX policy XXXX application XXXX
set security policies from-zone XXX to-zne XXX policy XXXX then permit
set security policies from-zone XXX to-zne XXX policy XXXX then log session-init
set security policies from-zone XXX to-zne XXX policy XXXX then log session-close

How to check traffic-log on SRX




hardware/junos/traffice-monitor.txt ยท Last modified: 2020/03/11 by admin

Page Tools