Got it

How does the ACL filter the odd IP address

Latest reply: Dec 5, 2019 15:26:28 1690 3 8 0 4

Few days ago, one guy asked me could the ACL filter the specifc addresses, such as,, As many of us would create three rules to match these three IPs, but actually, we could do that task with one rule.

In this post, we are gonna to introduce the special filter methods with ACL.

First of all, let’s take a look at the structure of the rule


As we know, it is the wildcard of source field which decides the part of source IP address to be matched, 0 in the wildcard of source indicates the corresponding bit in the source IP should match, while 1 indicates the corresponding bit might not match.

Commonly, we create the rules with wildcard structure as, but actually, we can modify the wildcard to match some special requests.

For example, if we want to pick out the IP address ended with odd number, such as,,……,, we can set wildcard as

How does it work? Let’s take a look at the analyzation below:


As the picture above displayed, when the wildcard is, the first seven bits of the last eight bits may not match, and the last bit should match. In this situation, the last number of the source IP address will be the odd number.

Let’s do an example, the topology is as below:


when we want to allow PC2 and PC4 can access the router while PC1 and PC3 not. The ACL should be as below:


the test result verified our idea.







On the other hand, if the PC1 and PC3 are allowed while PC2 and PC4 not, the ACL should be modified as below:


And the result is just as we predicted.








Actually, more rules could be created to match other special requests. We talked about only in two scenarios, if you guys have any interesting ideas, please feel free to share it out.

That’s all for this post. Hope you like it, if you have other comments, feel free to post it out. And you can find more on our support website (click HERE) and knowledge base (click HERE).



  • x
  • convention:

MVE Created Nov 29, 2019 09:40:22

Clear, thanks
View more
  • x
  • convention:

Created Nov 30, 2019 12:44:37

View more
  • x
  • convention:

Created Dec 5, 2019 15:26:28

Useful, Thanks.
View more
  • x
  • convention:


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

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


Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.