System Setup and Software Installation Guide for Cisco NCS 1010, IOS XR Releases

PDF

ACL configuration procedures

Want to summarize with AI?

Log in

Provides links to ACL configuration procedures for Cisco NCS 1010, including IPv4, IPv6, extended ACL, and ACL modification tasks.


Use this reference to choose the correct ACL configuration task for the required traffic direction, IP version, or access-list operation.

The ACL configuration procedures include the following tasks.


Configure an ingress IPv4 ACL on management Ethernet interface

Configure an ingress IPv4 ACL on management Ethernet interface so that Cisco NCS 1010 uses the required settings for the selected system setup, management, or routing workflow.

Use the following configuration to configure an ingress IPv4 ACL on mgmtEth interface.

Before you begin

Follow these steps to configure an ingress IPv4 ACL on management Ethernet interface:

Procedure

1.

Run the configure command to configure mgmtEth interface with an IPv4 address.

Example:


/* Configure mgmtEth interface with an IPv4 address */
RP/0/RP0/CPU0:ios#configure                                                 
Thu Oct 19 17:30:23.719 UTC
RP/0/RP0/CPU0:ios(config)#
RP/0/RP0/CPU0:ios(config)#interface mgmtEth 0/RP0/CPU0/0 
RP/0/RP0/CPU0:ios(config-if)#interface mgmtEth 0/RP0/CPU0/2 
RP/0/RP0/CPU0:ios(config-if)#ipv4 address 198.51.100.247 255.255.255.0
RP/0/RP0/CPU0:ios(config-if)#no shutdown
RP/0/RP0/CPU0:ios(config-if)#commit
Thu Oct 19 17:31:25.127 UTC
RP/0/RP0/CPU0:ios(config-if)#exit
2.

Run the show ipv4 interface brief command to verify if the interface is up.

Example:


/* Verify if the interface is up */
RP/0/RP0/CPU0:ios(config)#do show ipv4 interface brief 
Thu Oct 19 17:32:10.998 UTC

Interface                      IP-Address      Status          Protocol Vrf-Name
Loopback0                      192.0.2.89      Up              Up       default 
GigabitEthernet0/0/0/0         198.51.100.1    Up              Up       default 
GigabitEthernet0/0/0/2         198.51.100.10   Up              Up       default 
MgmtEth0/RP0/CPU0/0            198.51.100.247  Up              Up       default 
PTP0/RP0/CPU0/0                unassigned      Shutdown        Down     default 
MgmtEth0/RP0/CPU0/1            192.0.2.121     Up              Up       default 
PTP0/RP0/CPU0/1                unassigned      Shutdown        Down     default 
MgmtEth0/RP0/CPU0/2            192.0.2.1       Down            Down     default
3.

Run the ipv4 access-list V4-ACL-INGRESS command to configure an IPv4 ingress ACL.

Example:


/* Configure an IPv4 ingress ACL */
RP/0/RP0/CPU0:ios(config)# ipv4 access-list V4-ACL-INGRESS
RP/0/RP0/CPU0:ios(config-ipv4-acl)# 10 permit tcp 192.0.2.2 255.255.255.0 any
RP/0/RP0/CPU0:ios(config-ipv4-acl)# 20 deny udp any any
RP/0/RP0/CPU0:ios(config-ipv4-acl)# 30 permit ipv4 192.0.2.64 255.255.255.0 any
RP/0/RP0/CPU0:ios(config-ipv4-acl)# commit
Thu Oct 19 18:31:25.127 UTC
4.

Run the show access-lists ipv4 command to verify the ingress ACL creation.

Example:


/* Verify the ingress ACL creation */
RP/0/RP0/CPU0:ios(config)# do show access-lists ipv4 
Thu Oct 19 18:32:25.127 UTC
...
ipv4 access-list V4-ACL-INGRESS
 10 permit tcp 192.0.2.2 255.255.255.0 any
 20 deny udp any any
 30 permit ipv4 192.0.2.64 255.255.255.0 any
5.

Run the interface mgmtEth 0/RP0/CPU0/0 command to apply the ingress ACL to the mgmtEth interface.

Example:


/* Apply the ingress ACL to the mgmtEth interface */
RP/0/RP0/CPU0:ios(config)# interface mgmtEth 0/RP0/CPU0/0
RP/0/RP0/CPU0:ios(config-if)# ipv4 access-group V4-ACL-INGRESS ingress
RP/0/RP0/CPU0:ios(config-if)#commit
Thu Oct 19 18:34:25.127 UTC
RP/0/RP0/CPU0:ios(config-if)#exit
6.

Run the show ipv4 interface mgmtEth 0/RP0/CPU0/0 command to verify if the ingress ACL has been successfully applied to the interface.

Example:


/* Verify if the ingress ACL has been successfully applied to the interface */

RP/0/RP0/CPU0:ios#show ipv4 interface mgmtEth 0/RP0/CPU0/0
Fri Oct 20 05:07:06.383 UTC
MgmtEth0/RP0/CPU0/0 is Up, ipv4 protocol is Up 
  Vrf is default (vrfid 0x60000000)
  Internet address is 198.51.100.247/16
  MTU is 1514 (1500 is available to IP)
  Helper address is not set
  Directed broadcast forwarding is disabled
  Outgoing access list is not set
  Inbound  common access list is not set, access list is V4-ACL-INGRESS
  Proxy ARP is disabled
  ICMP redirects are never sent
  ICMP unreachables are always sent
  ICMP mask replies are never sent
  Table Id is 0xe0000000

You have successfully configured an IPv4 ingress ACL on the mgmtEth interface.


Configure an egress IPv4 ACL on the management Ethernet interface

Configure an egress IPv4 ACL on the management Ethernet interface so that Cisco NCS 1010 uses the required settings for the selected system setup, management, or routing workflow.

Use the following configuration to configure an egress IPv4 ACL on the mgmtEth interface.

Before you begin

Follow these steps to configure an egress IPv4 ACL on the management Ethernet interface:

Procedure

1.

Run the configure command to configure mgmtEth interface with an IPv4 address.

Example:


/* Configure mgmtEth interface with an IPv4 address */
RP/0/RP0/CPU0:ios#configure                                                   
Thu Oct 19 17:30:23.719 UTC
RP/0/RP0/CPU0:ios(config)#
RP/0/RP0/CPU0:ios(config)#interface mgmtEth 0/RP0/CPU0/0 
RP/0/RP0/CPU0:ios(config-if)#ipv4 address 198.51.100.247 255.255.255.0
RP/0/RP0/CPU0:ios(config-if)#no shutdown
RP/0/RP0/CPU0:ios(config-if)#commit
Thu Oct 19 17:31:25.127 UTC
RP/0/RP0/CPU0:ios(config-if)#exit
2.

Run the show ipv4 interface brief command to verify if the interface is up.

Example:


/* Verify if the interface is up */
RP/0/RP0/CPU0:ios(config)#do show ipv4 interface brief 
Thu Oct 19 17:32:10.998 UTC

Interface                      IP-Address      Status          Protocol Vrf-Name
Loopback0                      192.0.2.89      Up              Up       default 
GigabitEthernet0/0/0/0         198.51.100.1    Up              Up       default 
GigabitEthernet0/0/0/2         198.51.100.10   Up              Up       default 
MgmtEth0/RP0/CPU0/0            198.51.100.247  Up              Up       default 
PTP0/RP0/CPU0/0                unassigned      Shutdown        Down     default 
MgmtEth0/RP0/CPU0/1            192.0.2.121     Up              Up       default 
PTP0/RP0/CPU0/1                unassigned      Shutdown        Down     default 
MgmtEth0/RP0/CPU0/2            192.0.2.1       Down            Down     default
3.

Run the ipv4 access-list V4-ACL-EGRESS command to configure an IPv4 egress ACL.

Example:


/* Configure an IPv4 egress ACL */
RP/0/RP0/CPU0:ios(config)# ipv4 access-list V4-ACL-EGRESS
RP/0/RP0/CPU0:ios(config-ipv4-acl)# 10 permit ipv4 203.0.113.1 255.255.255.0 192.0.2.1 0.255.255.255
RP/0/RP0/CPU0:ios(config-ipv4-acl)# 20 deny udp any any
RP/0/RP0/CPU0:ios(config-ipv4-acl)# commit
Thu Oct 19 18:31:25.127 UTC
4.

Run the show access-lists ipv4 command to verify the egress ACL creation.

Example:


/* Verify the egress ACL creation */
RP/0/RP0/CPU0:ios(config)# do show access-lists ipv4 
Thu Oct 19 18:32:25.127 UTC
ipv4 access-list V4-ACL-EGRESS
 10 permit ipv4 203.0.113.1 255.255.255.0 192.0.2.1 255.255.255.0
 20 deny ipv4 any any
...
5.

Run the interface mgmtEth 0/RP0/CPU0/0 command to apply the egress ACL to the mgmtEth interface.

Example:


/* Apply the egress ACL to the mgmtEth interface */
RP/0/RP0/CPU0:ios(config)# interface mgmtEth 0/RP0/CPU0/0
RP/0/RP0/CPU0:ios(config-if)# ipv4 access-group V4-ACL-EGRESS egress
RP/0/RP0/CPU0:ios(config-if)# commit
Thu Jul 11 09:19:49.569 UTC
RP/0/RP0/CPU0:ios(config-if)# exit
6.

Run the show ipv4 interface mgmtEth 0/RP0/CPU0/0 command to verify if the egress ACL has been successfully applied to the interface.

Example:


/* Verify if the egress ACL has been successfully applied to the interface */

RP/0/RP0/CPU0:ios#show ipv4 interface mgmtEth 0/RP0/CPU0/0
Fri Oct 20 05:07:06.383 UTC
MgmtEth0/RP0/CPU0/0 is Up, ipv4 protocol is Up 
  Vrf is default (vrfid 0x60000000)
  Internet address is 198.51.100.247/16
  MTU is 1514 (1500 is available to IP)
  Helper address is not set
  Directed broadcast forwarding is disabled
  Outgoing access list is V4-ACL-EGRESS
  Inbound  common access list is not set, access list is not set
  Proxy ARP is disabled
  ICMP redirects are never sent
  ICMP unreachables are always sent
  ICMP mask replies are never sent
  Table Id is 0xe0000000

You have successfully configured an IPv4 egress ACL on the mgmtEth interface.


Configure an ingress IPv6 ACL on the management Ethernet interface

Configure an ingress IPv6 ACL on the management Ethernet interface so that Cisco NCS 1010 uses the required settings for the selected system setup, management, or routing workflow.

Use the following configuration to configure an ingress IPv6 ACL on the mgmtEth interface.

Before you begin

Follow these steps to configure an ingress IPv6 ACL on the management Ethernet interface:

Procedure

1.

Run the required command to configure a mgmtEth interface with an IPv6 address.

Example:


/* Configure a mgmtEth interface with an IPv6 address */
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#configure
Fri Oct 20 05:25:58.785 UTC
RP/0/RP0/CPU0:ios(config)#interface mgmtEth 0/RP0/CPU0/1
RP/0/RP0/CPU0:ios(config-if)#ipv6 address 2001::1/64
RP/0/RP0/CPU0:ios(config-if)#no shutdown 
RP/0/RP0/CPU0:ios(config-if)#commit
Fri Oct 20 05:26:13.669 UTC
RP/0/RP0/CPU0:ios(config-if)#exit
2.

Run the show ipv6 interface mgmtEth 0/RP0/CPU0/1 brief command to verify if the interface is up.

Example:


/* Verify if the interface is up */
RP/0/RP0/CPU0:ios(config)#do show ipv6 interface mgmtEth 0/RP0/CPU0/1 brief
Fri Oct 20 05:26:52.612 UTC
MgmtEth0/RP0/CPU0/1    [Up/Up]
    fe80::3afd:f8ff:fe66:872                      
    2001::1                  
3.

Run the ipv6 access-list V6-INGRESS-ACL command to configure an IPv6 ingress ACL.

Example:


/* Configure an IPv6 ingress ACL */
RP/0/RP0/CPU0:ios(config)#ipv6 access-list V6-INGRESS-ACL
RP/0/RP0/CPU0:ios(config-ipv6-acl)#10 permit ipv6 any any
RP/0/RP0/CPU0:ios(config-ipv6-acl)#20 deny udp any any
RP/0/RP0/CPU0:ios(config-ipv6-acl)#commit
Fri Oct 20 05:28:46.664 UTC
RP/0/RP0/CPU0:ios(config-ipv6-acl)#exit
4.

Run the show access-lists ipv6 command to verify the ingress ACL creation.

Example:


/* Verify the ingress ACL creation */
RP/0/RP0/CPU0:ios(config)#do show access-lists ipv6 
Fri Oct 20 05:29:01.125 UTC
ipv6 access-list V6-INGRESS-ACL
 10 permit ipv6 any any
 20 deny udp any any
5.

Run the interface mgmtEth 0/RP0/CPU0/1 command to apply the ingress ACL to the HundredGigE interface.

Example:


/* Apply the ingress ACL to the HundredGigE interface */
RP/0/RP0/CPU0:ios(config)#interface mgmtEth 0/RP0/CPU0/1
RP/0/RP0/CPU0:ios(config-if)#ipv6 access-group V6-INGRESS-ACL ingress
RP/0/RP0/CPU0:ios(config-if)#commit
Fri Oct 20 05:37:32.738 UTC
RP/0/RP0/CPU0:ios(config-if)#exit
6.

Run the show ipv6 interface mgmtEth 0/RP0/CPU0/1 command to verify if the ingress ACL has been successfully applied to the interface.

Example:


/* Verify if the ingress ACL has been successfully applied to the interface */
RP/0/RP0/CPU0:ios(config)#do show ipv6 interface mgmtEth 0/RP0/CPU0/1
Fri Oct 20 05:38:00.753 UTC
MgmtEth0/RP0/CPU0/1 is Up, ipv6 protocol is Up, Vrfid is default (0x60000000)
  IPv6 is enabled, link-local address is fe80::3afd:f8ff:fe66:872 
  Global unicast address(es):
    2001::1, subnet is 2001::/64 
  Joined group address(es): ff02::1:ff00:1 ff02::1:ff66:872 ff02::2
      ff02::1
  MTU is 1514 (1500 is available to IPv6)
  ICMP redirects are disabled
  ICMP unreachables are enabled
  ND DAD is enabled, number of DAD attempts 1
  ND reachable time is 0 milliseconds
  ND cache entry limit is 1000000000
  ND advertised retransmit interval is 0 milliseconds
  ND router advertisements are sent every 160 to 240 seconds
  ND router advertisements live for 1800 seconds
  Hosts use stateless autoconfig for addresses.
  Outgoing access list is not set
  Inbound  common access list is not set, access list is V6-INGRESS-ACL
  Table Id is 0xe0800000
  Complete protocol adjacency: 0
  Complete glean adjacency: 0
  Incomplete protocol adjacency: 0
  Incomplete glean adjacency: 0
  Dropped protocol request: 0
  Dropped glean request: 0
  RA DNS Server Address Count: 0
  RA DNS Search list Count: 0

You have successfully configured an IPv6 ingress ACL on the mgmtEth interface.


Configure an egress IPv6 ACL on the management Ethernet interface

Configure an egress IPv6 ACL on the management Ethernet interface so that Cisco NCS 1010 uses the required settings for the selected system setup, management, or routing workflow.

Use the following configuration steps to configure an egress IPv6 ACL on the mgmtEth interface.

Before you begin

Follow these steps to configure an egress IPv6 ACL on the management Ethernet interface:

Procedure

1.

Run the interface mgmtEth 0/RP0/CPU0/1 command to configure a mgmtEth interface with an IPv6 address.

Example:


/* Configure a mgmtEth interface with an IPv6 address */
RP/0/RP0/CPU0:ios(config)#interface mgmtEth 0/RP0/CPU0/1
RP/0/RP0/CPU0:ios(config-if)#ipv6 address 2001::1/64
RP/0/RP0/CPU0:ios(config-if)#no shutdown 
RP/0/RP0/CPU0:ios(config-if)#commit
Thu Jan 25 11:41:25.778 IST
Router(config-if)# exit
2.

Run the show ipv6 interface brief command to verify if the interface is up.

Example:


/* Verify if the interface is up */
Router(config)# do show ipv6 interface brief
Thu Jul 11 09:47:50.812 UTC
HundredGigE 0/0/0/0 [Up/Up]
    fe80::bd:b9ff:fea9:5606                       
    1001::1                                       
HundredGigE 0/0/0/1 [Up/Up]
    fe80::23:e9ff:fea8:a44e                       
    2001::1
3.

Run the ipv6 access-list V6-EGRESS-ACL command to configure an IPv6 egress ACL.

Example:


/* Configure an IPv6 egress ACL */
Router(config)# ipv6 access-list V6-EGRESS-ACL 
Router(config-ipv6-acl)# 10 permit ipv6 any any
Router(config-ipv6-acl)# 20 deny udp any any
Router(config-ipv6-acl)# commit
Thu Jul 11 09:50:40.566 UTC
Router(config-ipv6-acl)# exit
4.

Run the show ipv6 interface mgmtEth 0/RP0/CPU0/1 brief command to verify the egress ACL creation.

Example:


/* Verify the egress ACL creation */
RP/0/RP0/CPU0:ios(config)#do show ipv6 interface mgmtEth 0/RP0/CPU0/1 brief
Fri Oct 20 05:26:52.612 UTC
MgmtEth0/RP0/CPU0/1    [Up/Up]
    fe80::3afd:f8ff:fe66:872                      
    2001::1         
…
5.

Run the interface mgmtEth 0/RP0/CPU0/1 command to apply the egress ACL to the mgmtEth interface.

Example:


/* Apply the egress ACL to the mgmtEth interface */
Router(config)# interface mgmtEth 0/RP0/CPU0/1
Router(config-if)# ipv6 access-group V6-EGRESS-ACL egress
Router(config-if)# commit
Thu Jul 11 09:52:57.751 UTC
Router(config-if)# exit
6.

Run the show ipv6 interface mgmtEth 0/RP0/CPU0/1 command to verify if the egress ACL has been successfully applied to the interface.

Example:


/* Verify if the egress ACL has been successfully applied to the interface */
RP/0/RP0/CPU0:ios(config)#do show ipv6 interface mgmtEth 0/RP0/CPU0/1
Fri Oct 20 05:38:00.753 UTC
MgmtEth0/RP0/CPU0/1 is Up, ipv6 protocol is Up, Vrfid is default (0x60000000)
  IPv6 is enabled, link-local address is fe80::3afd:f8ff:fe66:872 
  Global unicast address(es):
    2001::1, subnet is 2001::/64 
  Joined group address(es): ff02::1:ff00:1 ff02::1:ff66:872 ff02::2
      ff02::1
  MTU is 1514 (1500 is available to IPv6)
  ICMP redirects are disabled
  ICMP unreachables are enabled
  ND DAD is enabled, number of DAD attempts 1
  ND reachable time is 0 milliseconds
  ND cache entry limit is 1000000000
  ND advertised retransmit interval is 0 milliseconds
  ND router advertisements are sent every 160 to 240 seconds
  ND router advertisements live for 1800 seconds
  Hosts use stateless autoconfig for addresses.
  Outgoing access list is V6-EGRESS-ACL
  Inbound  common access list is not set, access list is not set
  Table Id is 0xe0800000
  Complete protocol adjacency: 0
  Complete glean adjacency: 0
  Incomplete protocol adjacency: 0
  Incomplete glean adjacency: 0
  Dropped protocol request: 0
  Dropped glean request: 0
  RA DNS Server Address Count: 0
  RA DNS Search list Count: 0
...

You have successfully configured an IPv6 egress ACL on the mgmtEth interface.


Configure extended access lists

Configure extended access lists so that Cisco NCS 1010 uses the required settings for the selected system setup, management, or routing workflow.

To configure Extended Access Lists, you must create an access list and specify the condition to allow or deny the network traffic.

Use Extended Access Lists to verify more than just the source address of the packets. Attributes such as destination address, specific IP protocols, UDP or TCP port numbers, DSCP, and so on are validated. Traffic is controlled by a comparison of the attributes stated in the ACL with those in the incoming or outgoing packets.

Running Configuration

Verification

Before you begin

Follow these steps to configure extended access lists:

Procedure

1.

Run the configure command to enter the global configuration mode and create the access list.

Example:


/* Enter the global configuration mode and create the access list*/
RP/0/RP0/CPU0:ios#configure
RP/0/RP0/CPU0:ios(config)#ipv4 access-list acl_1
RP/0/RP0/CPU0:ios(config-ipv4-acl)#10 remark Do not allow user1 to telnet out
/*Specify the condition to allow or deny the network traffic.*/
RP/0/RP0/CPU0:ios(config-ipv4-acl)#10 permit 172.16.0.0 0.0.255.255
RP/0/RP0/CPU0:ios(config-ipv4-acl)#20 deny 192.168.34.0 0.0.0.255
RP/0/RP0/CPU0:ios(config-ipv4-acl)#commit
2.

Run the show running-config command to verify the configuration.

Example:


RP/0/RP0/CPU0:ios#show running-config  
Fri Oct 20 06:21:11.024 UTC
!! Building configuration...
!! IOS XR Configuration 24.1.1.23I
!! Last configuration change at Fri Oct 20 06:19:08 2023 by cisco

!
ipv4 access-list acl_1
 10 permit ipv4 172.16.0.0 0.0.255.255 any
 20 deny ipv4 192.168.34.0 0.0.0.255 any
!
3.

Run the show access-lists ipv4 acl_1 command to verify the configuration.

Example:


RP/0/RP0/CPU0:ios#show access-lists ipv4 acl_1 
Fri Oct 20 06:22:17.223 UTC
ipv4 access-list acl_1
 10 permit ipv4 172.16.0.0 0.0.255.255 any
 20 deny ipv4 192.168.34.0 0.0.0.255 any

The system completes the configure extended access lists task.


Modify ACLs

Configure modify ACLs so that Cisco NCS 1010 uses the required settings for the selected system setup, management, or routing workflow.

This section describes a sample configuration to modify ACLs.

*/When an entry is added without a sequence number, it is automatically given a sequence number that puts it at the end of the access list. Because the default increment is 10, the entry will have a sequence number 10 higher than the last entry in the existing access list*/

Before you begin

Follow these steps to modify ACLs:

Procedure

1.

Run the configure command to complete this action.

Example:


*/ Create an Access List*/
RP/0/RP0/CPU0:ios#configure
RP/0/RP0/CPU0:ios(config)#ipv4 access-list acl_1

*/Add entries (ACEs) to the ACL*/
RP/0/RP0/CPU0:ios(config-ipv4-acl)#10 permit ip host 10.3.3.3 host 172.16.5.34
RP/0/RP0/CPU0:ios(config-ipv4-acl)#20 permit icmp any any
RP/0/RP0/CPU0:ios(config-ipv4-acl)#30 permit tcp any host 10.3.3.3
RP/0/RP0/CPU0:ios(config-ipv4-acl)#end
2.

Run the */Verify the entries of the ACL*/: command to complete this action.

Example:


*/Verify the entries of the ACL*/:
Router#show access-lists ipv4 acl_1
ipv4 access-list acl_1
10 permit ip host 10.3.3.3 host 172.16.5.34
20 permit icmp any any
30 permit tcp any host 10.3.3.3
3.

Run the ipv4 access-list acl_1 command to complete this action.

Example:


*/Add new entries, one with a sequence number "15" and another without a sequence number to the ACL. Delete an entry with the sequence number "30":*/
RP/0/RP0/CPU0:ios(config)#ipv4 access-list acl_1
RP/0/RP0/CPU0:ios(config-ipv4-acl)# 15 permit 10.5.5.5 0.0.0.255
RP/0/RP0/CPU0:ios(config-ipv4-acl)# no 30
RP/0/RP0/CPU0:ios(config-ipv4-acl)# permit 10.4.4.4 0.0.0.255
RP/0/RP0/CPU0:ios(config-ipv4-acl)# commit
4.

Run the show access-lists ipv4 acl_1 command to verify the configuration.

Example:


*/Verify the entries of the ACL:*/
RP/0/RP0/CPU0:ios#show access-lists ipv4 acl_1
ipv4 access-list acl_1
 10 permit ipv4 host 10.3.3.3 host 172.16.5.34

15 permit 10.5.5.5 0.0.0.255---*/newly added ACL (with the sequence number)*/
20 permit icmp any any
30 permit ipv4 10.4.4.0 0.0.0.255 any ---*/newly added ACL (without the sequence number)*/

*/The entry with the sequence number 30, that is, "30 permit tcp any host 10.3.3.3" is deleted from the ACL*/

You have successfully modified ACLs in operation.