Creating An Acl Using The Cli; Ace Rules - HP 2530 Manual Supplement

Table of Contents

Advertisement

Creating an ACL using the CLI

Command
access-list (standard ACLs)
access-list (extended ACLs)
ip access-list (named ACLs)
You can use either the switch CLI or an offline text editor to create an ACL. HP recommends that
you use the CLI method for creating short ACLs; to use the offline method, see
an ACL offline" (page 102)

ACE rules

These rules apply to all ACEs you create or edit using the CLI.
Adding or inserting an ACE in an ACL.
To add an ACE to the end of an ACL:
1.
Use the ipv6 access-list <name-str> command to enter the context for a specific
IPv6 ACL. (If the ACL does not already exist in the switch configuration, this command creates
it.)
2.
Enter the text of the ACE without specifying a sequence number.
For example, the following pair of commands enter the context of an ACL named "List- 1 " and
add a "permit" ACE at the end of the list. This new ACE permits IPv6 traffic from the device
at 2001:db8:0:a9:8d:100 to go to all destinations.
HP Switch(config)# ipv6 access-list List-1
HP Switch(config-ipv6-acl)# permit host 2001:db8:0:a9::8d:100 any
To insert an ACE anywhere in an existing ACL:
1.
Enter the ACL context.
2.
Specify a sequence number.
For example, to insert a new ACE as line 15 between lines 10 and 20 in an existing ACL
named "List-2" to deny traffic from the device at 2001:db8:0:a9::8d:77:, enter these
commands:
HP Switch(config)# ipv6 access-list List-2
HP Switch(config-ipv6-acl)# deny host 2001:db8:0:a9::8d:77 any
Deleting an ACE.
1.
Enter the ACL context.
2.
Delete the sequence number for the unwanted ACE.
(To view the sequence numbers of the ACEs in a list, use show access-list
<acl-name-str> config.)
For example, to delete the ACE at line 40 in an ACL named "List-2", enter the following
commands:
HP Switch(config)# ipv6 access-list List-2 config
HP Switch(config-ipv6-acl)# no 40
Duplicate ACE sequence numbers.
Page
"Configuring and assigning
an ACL" (page 74)
"Configuring and assigning
an ACL" (page 74)
"Configuring and assigning
an ACL" (page 74)
"Creating or editing
Configuring and assigning an ACL
79

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents