ip access-class

To create or configure an IPv4 access class to restrict incoming or outgoing traffic on a virtual terminal line (VTY), use the ip access-class command. To remove the access class, use the no form of this command.

ip access-class access-list-name { in | out }

no ip access-class access-list-name { in | out }

Syntax Description

access-list-name
Name of the IPv4 ACL class. The name can be a maximum of 64 characters. The name can contain characters, numbers, hyphens, and underscores. The name cannot contain a space or quotation mark.
in
Specifies that incoming connections be restricted between a particular Cisco Nexus 5000 Series switch and the addresses in the access list.
out
Specifies that outgoing connections be restricted between a particular Cisco Nexus 5000 Series switch and the addresses in the access list.

Command Default

None

Command Modes

Line configuration mode

Command History

Release
Modification
5.0(2)N1(1)
This command was introduced.

Examples

This example shows how to configure an IP access class on a VTY line to restrict inbound packets:

switch# configure terminal
switch(config)# line vty
switch(config-line)# ip access-class VTY_ACCESS in
switch(config-line)#
 

This example shows how to remove an IP access class that restricts inbound packets:

switch(config)# line vty
switch(config-line)# no ip access-class VTY_ACCESS in
switch(config-line)#
 

Related Commands

Command
Description
access-class
Configures an access class for VTY.
copy running-config startup-config
Copies the running configuration to the startup configuration file.
show line
Displays the access lists for a particular terminal line.
show running-config aclmgr
Displays the running configuration of ACLs.
show startup-config aclmgr
Displays the startup configuration for ACLs.
ssh
Starts an SSH session using IPv4.
telnet
Starts a Telnet session using IPv4.