HP 6125G HP 6125G & 6125G/XG Blade Switches ACL and QoS Command Refere - Page 35

rule comment

Page 35 highlights

Examples # Create an IPv6 basic ACL rule to deny the packets from any source IP segment but 1001::/16, 3124:1123::/32, or FE80:5060:1001::/48. system-view [Sysname] acl ipv6 number 2000 [Sysname-acl6-basic-2000] rule permit source 1001:: 16 [Sysname-acl6-basic-2000] rule permit source 3124:1123:: 32 [Sysname-acl6-basic-2000] rule permit source fe80:5060:1001:: 48 [Sysname-acl6-basic-2000] rule deny source any rule comment Syntax rule rule-id comment text View undo rule rule-id comment IPv4 basic/advanced ACL view, IPv6 basic/advanced ACL view, Ethernet frame header ACL view Default level 2: System level Parameters rule-id: Specifies ACL rule ID, in the range of 0 to 65534. The rule must already exist. text: Adds a comment about the ACL rule, a case-sensitive string of 1 to 127 characters. Description Use rule comment to add a comment about an existing ACL rule or edit its comment to make the rule easy to understand. Use undo rule comment to delete the ACL rule comment. By default, an IPv4 ACL rule has no rule comment. Related commands: display acl and display acl ipv6. Examples # Create a rule in IPv4 basic ACL 2000 and add a comment about the rule. system-view [Sysname] acl number 2000 [Sysname-acl-basic-2000] rule 0 deny source 1.1.1.1 0 [Sysname-acl-basic-2000] rule 0 comment This rule is used on GigabitEthernet 1/0/1. # Create a rule in IPv6 basic ACL 2000 and add a comment about the rule. system-view [Sysname] acl ipv6 number 2000 [Sysname-acl6-basic-2000] rule 0 permit source 1001::1 128 [Sysname-acl6-basic-2000] rule 0 comment This rule is used on GigabitEthernet 1/0/1. 30

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104

30
Examples
# Create an IPv6 basic ACL rule to deny the packets from any source IP segment but 1001::/16,
3124:1123::/32, or FE80:5060:1001::/48.
<Sysname> system-view
[Sysname] acl ipv6 number 2000
[Sysname-acl6-basic-2000] rule permit source 1001:: 16
[Sysname-acl6-basic-2000] rule permit source 3124:1123:: 32
[Sysname-acl6-basic-2000] rule permit source fe80:5060:1001:: 48
[Sysname-acl6-basic-2000] rule deny source any
rule comment
Syntax
rule
rule-id
comment
text
undo rule
rule-id
comment
View
IPv4 basic/advanced ACL view, IPv6 basic/advanced ACL view, Ethernet frame header ACL view
Default level
2: System level
Parameters
rule-id
: Specifies ACL rule ID, in the range of 0 to 65534. The rule must already exist.
text
: Adds a comment about the ACL rule, a case-sensitive string of 1 to 127 characters.
Description
Use
rule comment
to add a comment about an existing ACL rule or edit its comment to make the rule easy
to understand.
Use
undo rule comment
to delete the ACL rule comment.
By default, an IPv4 ACL rule has no rule comment.
Related commands:
display acl
and
display acl ipv6
.
Examples
# Create a rule in IPv4 basic ACL 2000 and add a comment about the rule.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule 0 deny source 1.1.1.1 0
[Sysname-acl-basic-2000] rule 0 comment This rule is used on GigabitEthernet 1/0/1.
# Create a rule in IPv6 basic ACL 2000 and add a comment about the rule.
<Sysname> system-view
[Sysname] acl ipv6 number 2000
[Sysname-acl6-basic-2000] rule 0 permit source 1001::1 128
[Sysname-acl6-basic-2000] rule 0 comment This rule is used on GigabitEthernet 1/0/1.