Got it

How to filter CLI output with regular expression to match a pattern Huawei OLT

Created: May 19, 2021 07:44:49Latest reply: Feb 10, 2022 12:57:27 306 15 0 0 0
  Rewarded HiCoins: 0 (problem resolved)

Hello


I need help on how to filter output of 

OLT#display arp vlan 3041


I need to only match IP addresses starting with a certain number. How to do that? For example


OLT#display arp vlan 3041 | include 102.



Thank you

Featured Answers

Best answer

Recommended answer

Chenxintao
Admin Created May 19, 2021 11:29:45

Hello, dear!


Tested:

The OLT does not support the display arp vlan | include x command or display arp adr | include x command, but only supports the display arp all | include x command.

Example:

OLT


Thanks!

View more
  • x
  • convention:

bigpaul
bigpaul Created May 19, 2021 12:58:33 (0) (0)
Thank you  
Chenxintao
Chenxintao Reply bigpaul  Created May 19, 2021 14:58:11 (0) (0)
You are welcome! My friend!  
user_3894435
user_3894435 Created Sep 11, 2021 16:10:31 (0) (0)
 
All Answers
Hello, friend!
Can you provide the model and version of your equipment?
View more
  • x
  • convention:

bigpaul
bigpaul Created May 19, 2021 08:45:17 (0) (0)
OLT1:
  VERSION : MA5600V800R018C10
  PATCH   : SPH217
  PRODUCT : MA5600T

OLT2:
  VERSION : MA5600V800R010C00
  PATCH   : SPC100 SPH106 HP1106
  PRODUCT : MA5603T

OLT3:
  VERSION : MA5600V800R013C10
  PATCH   : SPC216 HP2116
  PRODUCT : MA5683T

OLT4:
  VERSION : MA5600V800R015C00
  PATCH   : SPC100
  PRODUCT : MA5680T

OLT5:
  VERSION : MA5600V800R015C00
  PATCH   : SPH106 HP1013
  PRODUCT : MA5680T

OLT6:
VERSION : MA5600V800R009C00 PATCH : SPC  
Chenxintao
Chenxintao Reply bigpaul  Created May 19, 2021 08:55:20 (0) (0)
Thank you, dear!  

Hello, friend!


I'm sorry I'm late.


You direct can run the display arpip-addr [mpls] command to view the required information.


ip-addr: Queries ARP mapping entries based on a specified IP address. 

IPv4 address format. Dotted decimal notation.


You can also run the display arp all command to query all ARP mapping entries.


example:


huawei#display arp all

IP Address       MAC Address    VLAN ID F /S /P  ONT Type    VPN-Instance

10.1.1.x            00e0-fc00-xxxx     1       32/1 /0  -   Static

192.168.2.4     00e0-fc00-xxxx     N/A     MEth0    -   Dynamic

192.168.2.5     00e0-fc00-xxxx    N/A     MEth0    -   Dynamic

192.168.1.3     00e0-fc00-xxxx     2       0 /9 /0  -   Dynamic

192.168.1.4     00e0-fc00-xxxx     2       0 /9 /0  -   Dynamic

192.168.1.5     00e0-fc00-xxxx     2       0 /9 /0  -   Dynamic

192.168.1.6     00e0-fc00-xxxx     2       0 /9 /0  -   Dynamic

192.168.1.7     00e0-fc00-xxxx     2       0 /9 /0  -   Dynamic

192.168.1.8     00e0-fc00-xxxx     2       0 /9 /0  -   Dynamic

---   9 entries found   ---

Note: F--Frame, S--Slot, P--Port


Thanks!



View more
  • x
  • convention:

bigpaul
bigpaul Created May 19, 2021 08:30:00 (0) (0)
Hello

I dont need to see all arp entries. I need to only see what is matched. For example I only want to match 10.1.1.1 not all of the entries  
Chenxintao
Chenxintao Reply bigpaul  Created May 19, 2021 08:31:53 (0) (0)
Hi,
Is that what you mean?
display arp { all | dynamic | static } [ mpls ]
display arp vlan vlanid [ mpls ]
display arp ip-addr [ mpls ]
display arp proxy
display arp config
display arp number
display arp statistics  
Chenxintao
Chenxintao Reply bigpaul  Created May 19, 2021 08:33:53 (0) (0)
You can run the display arp 10.1.1.1 command.  
Chenxintao
Chenxintao Reply bigpaul  Created May 19, 2021 08:36:51 (0) (0)
Is that what mean? dear
If not, I'll always help you with the problem.  
bigpaul
bigpaul Reply Chenxintao  Created May 19, 2021 10:11:13 (0) (0)
I need to match IP addresses that start with 102. for example 102.0.1.2 or 102.1.1.2 or 102.4.5.6
So I want a command that will match all lines that have 102 in the output. In Cisco equipment for example I can do

route-views>show ip arp | include 128.
Internet 128.223.51.1 0 0022.bdf8.19ff ARPA TenGigabitEthernet0/0/0
Internet 128.223.51.11 82 0050.5680.5b6d ARPA TenGigabitEthernet0/0/0  
Chenxintao
Chenxintao Reply bigpaul  Created May 19, 2021 10:14:22 (0) (0)
Hi, dear!
I understand what you mean, but I need to check whether the MA5608T supports this function.
Please give me some time  

Hello, dear!


Tested:

The OLT does not support the display arp vlan | include x command or display arp adr | include x command, but only supports the display arp all | include x command.

Example:

OLT


Thanks!

View more
  • x
  • convention:

bigpaul
bigpaul Created May 19, 2021 12:58:33 (0) (0)
Thank you  
Chenxintao
Chenxintao Reply bigpaul  Created May 19, 2021 14:58:11 (0) (0)
You are welcome! My friend!  
user_3894435
user_3894435 Created Sep 11, 2021 16:10:31 (0) (0)
 
Good answer
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.