
一.设置过滤列表,定义捕获包的范围
Set ffilter src-ip x.x.x.x dst-ip x.x.x.x dst-port xx
Set ffilter src-ip 192.168.0.100 dst-ip 192.168.0.254
二.清除防火墙内存中缓存的分析包
Clear dbuf
三.开启debug数据流跟踪功能
debug flow basic
四.发送测试数据包:
Ping 192.168.0.254 from 192.168.0.100
五.检查防火墙对符合过滤条件数据包的分析结果
get dbuf stream
六.清除防火墙debug过滤列表
unset ffilter
七.清除防火墙缓存的debug信息
Clear dbuf
八.查看当前debug设置
get debug
九.关闭debug:
Undeug all
备注:不是所有的juniper ctl 命令都可以用tab健补全,无法补全的命令,不代表此命令不存在,有些命令必须手动输全,如debug命令
Ping不通时的debug数据包
****** packet decapsulated, type=l2tp, len=60******
ipid = 63557(f845), @2d483138
ethernet0/1:192.168.0.100/9729->192.168.0.254/1280,1(8/0)   no session found flow_first_sanity_check: in  flow_first_routing: in  search route to (ethernet0/1, 192.168.0.100->192.168.0.254) in vr trust-vr for vsd-0/flag-0/ifp-null [ Dest] 1.route 192.168.0.254->192.168.0.254, to ethernet0/0   routed (x_dst_ip 192.168.0.254) from ethernet0/1 (ethernet0/1 in 0) to ethernet0/0  policy search from zone 1-> zone 2 policy_flow_search  policy search nat_crt from zone 1-> zone 2   RPC Mapping Table search returned 0 matched service(s) for (vsys Root, ip 192.168.0.254, port 8795, proto 1) policy_flow_search  in tunnel pak_ptr policy: id: 17, from zone 1 -> 2   VPN policy= 17: szone 1 dzone 2 pid 17 ports 5b220008 iphdr 2d483138   Permitted by policy 17   No src xlate   choose interface ethernet0/0 as outgoing phy if   no loop on ifp ethernet0/0.   session application type 0, name None, nas_id 0, timeout 60sec   service lookup identified service 0. flow_first_final_check: in    existing vector list 5-7e5618c.   Session (id:127592) created for first pak 5 flow_first_install_session======>   route to 192.168.0.254   arp entry found for 192.168.0.254   ifp2 ethernet0/0, out_ifp ethernet0/0, flag 00800800, tunnel ffffffff, rc 1   outgoing wing prepared, ready   flow got session.   flow session id 127592   flow_main_body_vector in ifp ethernet0/1 out ifp ethernet0/0   flow vector index 0x5, vector addr 0x17a77f0, orig vector 0x17a77f0 post addr xlation: 192.168.0.100->192.168.0.254.   no more encapping needed   packet send out to c4cad95ae6fd through ethernet0/0 ****** packet decapsulated, type=l2tp, len=60****** Ping 通后的debug数据包: ****** packet decapsulated, type=l2tp, len=60******   ipid = 36081(8cf1), @2d723138 ethernet0/1:192.168.0.101/38144->192.168.0.254/1280,1(8/0)   no session found flow_first_sanity_check: in  flow_first_routing: in  search route to (ethernet0/1, 192.168.0.101->192.168.0.254) in vr trust-vr for vsd-0/flag-0/ifp-null [ Dest] 1.route 192.168.0.254->192.168.0.254, to ethernet0/0   routed (x_dst_ip 192.168.0.254) from ethernet0/1 (ethernet0/1 in 0) to ethernet0/0  policy search from zone 1-> zone 2 policy_flow_search  policy search nat_crt from zone 1-> zone 2   RPC Mapping Table search returned 0 matched service(s) for (vsys Root, ip 192.168.0.254, port 45915, proto 1) policy_flow_search  in tunnel pak_ptr policy: id: 17, from zone 1 -> 2   VPN policy= 17: szone 1 dzone 2 pid 17 ports 5bb30008 iphdr 2d723138   Permitted by policy 17 dip id = 2, 192.168.0.101/38144->192.168.0.1/21379   choose interface ethernet0/0 as outgoing phy if   no loop on ifp ethernet0/0.   session application type 0, name None, nas_id 0, timeout 60sec   service lookup identified service 0. flow_first_final_check: in    existing vector list 5-7e5618c.   Session (id:127434) created for first pak 5 flow_first_install_session======>   route to 192.168.0.254   arp entry found for 192.168.0.254   ifp2 ethernet0/0, out_ifp ethernet0/0, flag 10800800, tunnel ffffffff, rc 1   outgoing wing prepared, ready   flow got session.   flow session id 127434   flow_main_body_vector in ifp ethernet0/1 out ifp ethernet0/0   flow vector index 0x5, vector addr 0x17a77f0, orig vector 0x17a77f0 post addr xlation: 192.168.0.1->192.168.0.254.   no more encapping needed   packet send out to c4cad95ae6fd through ethernet0/0 ****** packet decapsulated, type=l2tp, len=60******
