cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
427
Views
2
Helpful
4
Replies

How to filter multiple "include" statements in a single search?

Hej

IOS XR 7.11.2
I am trying to figure out how I can filter multiple lines from a search statement using include.

For example I only want 3 lines containing "Interface:", "IPv4 State" and "IPv6 State" to show up when I do how subscriber session all detail instead of all the information below

 

Interface: Bundle-Ether666.430.ip59
Circuit ID: Unknown
Remote ID: Unknown
Type: IP: DHCP-trigger
IPv4 State: Up, Fri Aug 30 12:49:18 2024
IPv4 Address: 66.253.0.77, VRF: vrf-inet
IPv6 State: Up, Fri Aug 30 12:51:22 2024
IPv6 Address: 2001:2222::13, VRF: vrf-inet
IPv6 Interface ID: ..,..6\. (02 c5 2c 03 ea 36 5c e9)
Mac Address: 00c5.2c36.5ce9
Account-Session Id: 00000040
Nas-Port: Unknown
User name: 666-1002-434@nuuday.com
Formatted User name: 666-1002-434@nuuday.com
Client User name: unknown
Outer VLAN ID: 1002
Inner VLAN ID: 434
Subscriber Label: 0x0000014c
Created: Fri Aug 30 12:49:17 2024
State: Activated, Fri Aug 30 12:51:22 2024

Authentication: unauthenticated
Authorization: authorized
Access-interface: Bundle-Ether666.430
Policy Executed:
policy-map type control subscriber BNG_ACCESS_QinQ_VRF_430
event Session-Start match-first [at Fri Aug 30 12:49:17 2024]
class type control subscriber DHCP do-until-failure [Succeeded]
10 activate dynamic-template IPSUB_TPL_AF_VRF_430 [Succeeded]
20 authorize aaa list default [Succeeded]
Session Accounting: disabled
Last COA request received: unavailable

1 Accepted Solution

Accepted Solutions

Ok It seems to work when I add " to start and finish of Regex

show subscriber session all detail | include "^Interface|^IPv[46].State"

View solution in original post

4 Replies 4

Leo Laohoo
Hall of Fame
Hall of Fame

 

show subscriber session | include ^Interface|^IPv[46].State

 

I get an error

RP/0/RP0/CPU0:pe2.koeb3.dk#show subscriber session all detail | include ^Interface|^IPv[46].State
                                                                                                                                   ^
% Invalid input detected at '^' marker.

Ok It seems to work when I add " to start and finish of Regex

show subscriber session all detail | include "^Interface|^IPv[46].State"

When you use | it means or, but it has to be inside quotes as it thinks it's a parser filter like | include or | utility etc.

Sam