show services sessions
Syntax
Release Information
Command introduced in Junos OS Release 10.4.
Description
Display session information.
![]() | Note: On MX Series routers (with interchassis redundancy configured), the idle timeout for every flow is displayed in the show services session extensive and show services flows extensive commands. |
Options
none | — | Display standard information about all sessions. |
brief | extensive | terse | — | (Optional) Display the specified level of output. |
application-protocol | — | (Optional) Display information about one of the following application protocols:
|
count | — | (Optional) Display a count of the matching entries. |
destination-port destination-port | — | (Optional) Display information for a particular destination port. The range of values is from 0 to 65535. |
destination-prefix destination-prefix | — | (Optional) Display information for a particular destination prefix. |
interface interface-name | — | (Optional) Display information about a particular interface. On M Series and T Series routers, interface-name can be ms-fpc/pic/port or rspnumber. On J Series routers, interface-name is ms-pim/0/port. |
limit number | — | (Optional) Maximum number of entries to display. |
protocol protocol | — | (Optional) Display information about one of the following IP types:
|
service-set service-set | — | (Optional) Display information for a particular service set. |
source-port source-port | — | (Optional) Display information for a particular source port. The range of values is from 0 to 65535. |
source-prefix source-prefix | — | (Optional) Display information for a particular source prefix. |
Required Privilege Level
view
List of Sample Output
show services sessionsshow services sessions brief
show services sessions extensive
show services sessions terse
show services sessions application-protocol
show services sessions count
show services sessions destination port
show services sessions destination prefix
show services sessions interface
show services sessions protocol
show services sessions service-set
show services sessions source port
show services sessions source prefix
Output Fields
Table 1 lists the output fields for the show services sessions command. Output fields are listed in the approximate order in which they appear.
Table 1: show services sessions Output Fields
Field Name | Field Description |
---|---|
Interface | Name of the interface. |
Session ID | Session ID that uniquely identifies the session. |
ALG | Name of the application. |
Flags | Session flag for the ALG:
|
IP Action | Flag indicating whether IP action has been set for the session.. |
Offload | Flag indicating whether the session has been offloaded to the Packet Forwarding Engine. |
Asymmetric | Flag indicating whether the session is uni-directional. |
Service set | Name of a service set. Individual empty service sets are not displayed. |
Sessions Count | Number of sessions. |
Flow or Flow Prot | Protocol used for this session. |
Source | Source prefix of the flow in the format source-prefix:port. For ICMP flows, port information is not displayed. |
Dest | Destination prefix of the flow. For ICMP flows, port information is not displayed. |
State | Status of the flow:
|
Packet Direction | Direction of the flow: ingress (I), egress (O) or unknown. |
Frm count | Number of frames in the flow. |
Sample Output
show services sessions
user@host> show services sessions
ms-2/0/0 Session: 293, ALG: 16, Flags: 0x0040, IP Action: no, Offload: no UDP 10.10.10.2:43677 -> 10.20.20.1:53 Forward I 1 UDP 10.20.20.1:53 -> 1.1.1.1:43677 Forward O 1 Session: 53, ALG: 16, Flags: 0x0040, IP Action: no, Offload: no UDP 10.10.10.2:37494 -> 10.20.20.1:53 Forward I 1 UDP 10.20.20.1:53 -> 10.11.11.11:37494 Forward O 1 Session: 66, ALG: 16, Flags: 0x0040, IP Action: no, Offload: no UDP 10.10.10.2:48161 -> 10.20.20.1:53 Forward I 1 UDP 10.20.20.1:53 -> 10.11.11.11:48161 Forward O 1 Session: 17, ALG: 16, Flags: 0x0040, IP Action: no, Offload: no UDP 10.10.10.2:38908 -> 10.20.20.1:53 Forward I 1 UDP 10.20.20.1:53 -> 10.11.11.11:38908 Forward O 1 Session: 42, ALG: 16, Flags: 0x0040, IP Action: no, Offload: no UDP 10.10.10.2:58189 -> 10.20.20.1:53 Forward I 1 UDP 10.20.20.1:53 -> 10.11.11.11:58189 Forward O 1
show services sessions brief
The output for the show services flows brief command is identical to that for the show services sessions command. For sample output, see show services sessions.
show services sessions extensive
user@host> show services sessions extensive
ms-0/1/0 Session: 2, ALG: 0, Flags: 0x0080, IP Action: no, Offload: no NAT PLugin Data: NAT Action: Translation Type - DYNAMIC NAT44 NAT source 3.1.1.2 -> 10.10.10.127 TCP 3.1.1.2:52145 -> 4.1.1.2:23 Forward I 22 Byte count: 1483 Flow role: Unknown, Timeout: 0 TCP 4.1.1.2:23 -> 10.10.10.127:52145 Forward O 18 Byte count: 2712 Flow role: Unknown, Timeout: 0
show services sessions terse
user@router> show services sessions terse
ms-1/1/0 Session: 1, ALG: ftp, Flags: 0x2000, IP Action: no, Offload: no, Asymmetric: no TCP 10.2.2.2:52138 -> 10.1.1.2:21 Forward I 33 TCP 10.1.1.2:21 -> 10.2.2.2:52138 Forward O 31
show services sessions application-protocol
This command has the same output for the rpc, dce-rpc, rpc-portmap and dce-rpc-portmap ALGs.
user@router> show services sessions application-protocol
dce-rpc
Interface name: ms-1/1/0 Session: 8, ALG: portmapper, Flags: 0x1800, IP Action: no, Offload: no UDP 192.168.203.198:1019 ->192.168.203.194:2049 Forward I 4 UDP 192.168.203.194:2049 ->192.168.203.198:1019 Forward O 4 Session: 7, ALG: portmapper, Flags: 0x1800, IP Action: no, Offload: no UDP 192.168.203.198:954 ->192.168.203.194:613 Forward I 1 UDP 192.168.203.194:613 ->192.168.203.198:954 Forward O 1 Session: 6, ALG: portmapper, Flags: 0x1800, IP Action: no, Offload: no UDP 192.168.203.198:53836 ->192.168.203.194:613 Forward I 1 UDP 192.168.203.194:613 ->192.168.203.198:53836 Forward O 1 Session: 5, ALG: portmapper, Flags: 0x1000, IP Action: no, Offload: no UDP 192.168.203.198:59813 ->192.168.203.194:111 Forward I 1 UDP 192.168.203.194:111 ->192.168.203.198:59813 Forward O 1 Session: 4, ALG: portmapper, Flags: 0x1800, IP Action: no, Offload: no UDP 192.168.203.198:36595 ->192.168.203.194:2049 Forward I 1 UDP 192.168.203.194:2049 ->192.168.203.198:36595 Forward O 1 Session: 3, ALG: portmapper, Flags: 0x1000, IP Action: no, Offload: no UDP 192.168.203.198:56050 ->192.168.203.194:111 Forward I 1 UDP 192.168.203.194:111 ->192.168.203.198:56050 Forward O 1
user@router> show services sessions application-protocol
dns
Interface name: ms-2/0/0 Session: 293, ALG: 16, Flags: 0x0040, IP Action: no, Offload: no UDP 50.50.50.2:43677 -> 60.60.60.10:53 Forward I 1 UDP 60.60.60.10:53 -> 1.1.1.1:43677 Forward O 1 Session: 53, ALG: 16, Flags: 0x0040, IP Action: no, Offload: no UDP 50.50.50.2:37494 -> 60.60.60.10:53 Forward I 1 UDP 60.60.60.10:53 -> 1.1.1.1:37494 Forward O 1 Session: 66, ALG: 16, Flags: 0x0040, IP Action: no, Offload: no UDP 50.50.50.2:48161 -> 60.60.60.10:53 Forward I 1 UDP 60.60.60.10:53 -> 1.1.1.1:48161 Forward O 1 Session: 17, ALG: 16, Flags: 0x0040, IP Action: no, Offload: no UDP 50.50.50.2:38908 -> 60.60.60.10:53 Forward I 1 UDP 60.60.60.10:53 -> 1.1.1.1:38908 Forward O 1 Session: 42, ALG: 16, Flags: 0x0040, IP Action: no, Offload: no UDP 50.50.50.2:58189 -> 60.60.60.10:53 Forward I 1 UDP 60.60.60.10:53 -> 1.1.1.1:58189 Forward O 1
user@router> show services sessions application-protocol
ftp
Interface name: ms-4/1/0 Session: 1, ALG: 1, Flags: 0x0040, IP Action: no, Offload: no TCP 30.1.1.1:32843 -> 20.1.1.1:21 Forward I 26 TCP 20.1.1.1:21 -> 1.1.1.0:32843 Forward O 30
user@router> show services sessions application-protocol
pptp
Interface name: ms-2/0/0 Session: 3, ALG: pptp, Flags: 0x2800, IP Action: no, Offload: no, Asymmetric: no GRE 40.40.40.10:0 -> 15.15.15.10:0 Forward O 21 GRE 15.15.15.10:0 -> 40.40.40.10:65000 Forward I 0 Session: 2, ALG: pptp, Flags: 0x2800, IP Action: no, Offload: no, Asymmetric: no GRE 15.15.15.10:0 -> 40.40.40.10:49913 Forward I 88 GRE 40.40.40.10:49913 -> 15.15.15.10:65001 Forward O 0 Session: 1, ALG: pptp, Flags: 0x2000, IP Action: no, Offload: no, Asymmetric: no TCP 15.15.15.10:1511 -> 40.40.40.10:1723 Forward I 13 TCP 40.40.40.10:1723 -> 15.15.15.10:1511 Forward O 12
user@router> show services sessions application-protocol
rtsp
Interface name: ms-0/1/0 Session: 13, ALG: rtsp, Flags: 0x0800, IP Action: no, Offload: no UDP 9.1.0.2:5004 -> 9.0.0.2:3989 Forward O 152 UDP 9.0.0.2:3989 -> 3.1.2.1:5004 Forward I 0 Session: 9, ALG: rtsp, Flags: 0x0800, IP Action: no, Offload: no UDP 9.1.0.2:5004 -> 9.0.0.2:3986 Forward O 3 UDP 9.0.0.2:3986 -> 3.1.2.1:5004 Forward I 0
user@router> show services sessions application-protocol
rsh
Interface name: ms-2/0/0 Session: 3, ALG: 2, Flags: 0x0840, IP Action: no, Offload: no TCP 60.60.60.10:1023 -> 50.50.50.2:1020 Forward O 4 TCP 50.50.50.2:1020 -> 60.60.60.10:1023 Forward I 3 Session: 1, ALG: 2, Flags: 0x0040, IP Action: no, Offload: no TCP 50.50.50.2:1021 -> 60.60.60.10:514 Forward I 1331 TCP 60.60.60.10:514 -> 50.50.50.2:1021 Forward O 2485
user@router> show services sessions application-protocol
sip
Interface name: ms-2/0/0 Session: 4, ALG: sip, Flags: 0x0800, IP Action: no, Offload: no UDP 20.1.1.2:6000 -> 30.1.1.2:12682 Forward I 246 UDP 30.1.1.2:12682 -> 70.1.1.2:6000 Forward O 0 Session: 1, ALG: sip, Flags: 0x0000, IP Action: no, Offload: no UDP 20.1.1.2:5060 -> 30.1.1.2:5060 Forward I 10 UDP 30.1.1.2:5060 -> 70.1.1.2:5060 Forward O 9
user@router> show services sessions application-protocol
sql
Interface name: ms-2/0/0 Session: 3934, ALG: sqlnet, Flags: 0x0800, IP Action: no, Offload: no TCP 50.50.50.2:39754 -> 40.40.40.10:1408 Forward I 26 TCP 40.40.40.10:1408 -> 1.1.1.1:39754 Forward O 23
user@router> show services sessions application-protocol
talk
Interface name: ms-0/2/0 Session: 4, ALG: 65, Flags: 0x0800, IP Action: no, Offload: no TCP 2.2.2.2:36888 -> 1.1.1.2:33294 Forward O 4 TCP 1.1.1.2:33294 -> 2.2.2.2:36888 Forward I 3 Session: 7, ALG: 65, Flags: 0x0800, IP Action: no, Offload: no UDP 2.2.2.2:1165 -> 1.1.1.2:518 Forward O 1 UDP 1.1.1.2:518 -> 2.2.2.2:1165 Forward I 1 Session: 8, ALG: 65, Flags: 0x0000, IP Action: no, Offload: no UDP 1.1.1.2:1509 -> 2.2.2.2:518 Forward I 3 UDP 2.2.2.2:518 -> 1.1.1.2:1509 Forward O 3 Session: 6, ALG: 0, Flags: 0x0000, IP Action: no, Offload: no UDP 1.1.1.1:123 -> 1.1.1.2:123 Forward O 4
show services sessions count
user@host> show services sessions count
Interface Service set Sessions count ms-1/1/0 ss 2
show services sessions destination port
user@router> show services sessions destination-port
21
ms-1/1/0 Session: 1, ALG: ftp, Flags: 0x2000, IP Action: no, Offload: no, Asymmetric: no TCP 10.2.2.2:52138 -> 10.1.1.2:21 Forward I 25 TCP 10.1.1.2:21 -> 10.2.2.2:52138 Forward O 24
show services sessions destination prefix
user@router> show services sessions destination-prefix
10.1.1.2
ms-1/1/0 Session: 1, ALG: ftp, Flags: 0x2000, IP Action: no, Offload: no, Asymmetric: no TCP 10.2.2.2:52138 -> 10.1.1.2:21 Forward I 25 TCP 10.1.1.2:21 -> 10.2.2.2:52138 Forward O 24
show services sessions interface
user@router> show services sessions interface
ms-1/1/0
ms-1/1/0 Session: 1, ALG: ftp, Flags: 0x2000, IP Action: no, Offload: no, Asymmetric: no TCP 10.2.2.2:52138 -> 10.1.1.2:21 Forward I 30 TCP 10.1.1.2:21 -> 10.2.2.2:52138 Forward O 29
show services sessions protocol
user@router> show services sessions protocol
tcp
ms-1/1/0 Session: 1, ALG: ftp, Flags: 0x2000, IP Action: no, Offload: no, Asymmetric: no TCP 10.2.2.2:52138 -> 10.1.1.2:21 Forward I 30 TCP 10.1.1.2:21 -> 10.2.2.2:52138 Forward O 29
show services sessions service-set
user@router> show services sessions service-set
sample
ms-1/1/0 Session: 1, ALG: ftp, Flags: 0x2000, IP Action: no, Offload: no, Asymmetric: no TCP 10.2.2.2:52138 -> 10.1.1.2:21 Forward I 33 TCP 10.1.1.2:21 -> 10.2.2.2:52138 Forward O 31
show services sessions source port
user@router> show services sessions source-port
21
ms-1/1/0 Session: 1, ALG: ftp, Flags: 0x2000, IP Action: no, Offload: no, Asymmetric: no TCP 10.2.2.2:52138 -> 10.1.1.2:21 Forward I 33 TCP 10.1.1.2:21 -> 10.2.2.2:52138 Forward O 31
show services sessions source prefix
user@router> show services sessions source-prefix
10.2.2.2
ms-1/1/0 Session: 1, ALG: ftp, Flags: 0x2000, IP Action: no, Offload: no, Asymmetric: no TCP 10.2.2.2:52138 -> 10.1.1.2:21 Forward I 33 TCP 10.1.1.2:21 -> 10.2.2.2:52138 Forward O 31