Extended acl syntax – Brocade Virtual ADX Security Guide (Supporting ADX v03.1.00) User Manual

Page 43

Advertising
background image

Brocade Virtual ADX Security Guide

31

53-1003250-01

Configuring numbered and named ACLs

2

Extended ACL syntax

Use the following syntax for configuring extended numbered ACLs.

Syntax: [no] access-list num deny | permit ip-protocol source-ip | hostname wildcard [operator

source-tcp/udp-port] destination-ip | hostname [icmp-type | icmp-num |
icmp-type-number icmp-code-number] wildcard [operator destination-tcp/udp-port]
[established] [precedence name | num] [tos name | num] [ip-pkt-len value]

Syntax: [no] access-list num deny | permit host ip-protocol any any

Syntax: [no] ip access-group num in

The num variable indicates the ACL number and be from 100 – 199 for an extended ACL.

The deny | permit parameter indicates whether packets that match the policy are dropped or
forwarded.

The ip-protocol variable indicates the type of IP packet you are filtering. You can specify a
well-known name for any protocol whose number is less than 255. For other protocols, you must
enter the number. Enter “?” instead of a protocol to list the well-known names recognized by the
CLI.

The source-ip | hostname variable specifies the source IP host for the policy. If you want the policy
to match on all source addresses, enter any.

The wildcard variable specifies the portion of the source IP host address to match against. The
wildcard is a four-part value in dotted-decimal notation (IP address format) consisting of ones and
zeros. Zeros in the mask mean the packet’s source address must match the source-ip. Ones mean
any value matches. For example, the source-ip and wildcard values 10.157.22.26 0.0.0.255 mean
that all hosts in the Class C subnet 10.157.22.x match the policy.

If you prefer to specify the wildcard (mask value) in Classless Interdomain Routing (CIDR) format,
you can enter a forward slash after the IP address, then enter the number of significant bits in the
mask. For example, you can enter the CIDR equivalent of “10.157.22.26 0.0.0.255” as
“10.157.22.26/24”. The CLI automatically converts the CIDR number into the appropriate ACL
mask (where zeros instead of ones are the significant bits) and changes the non-significant portion
of the IP address into zeros. For example, if you specify 10.157.22.26/24 or 10.157.22.26
0.0.0.255, then save the changes to the startup-config file, the value appears as 10.157.22.0/24
(if you have enabled display of subnet lengths) or 10.157.22.0 0.0.0.255 in the startup-config file.

If you enable the software to display IP subnet masks in CIDR format, the mask is saved in the file
in “/mask-bits” format. To enable the software to display the CIDR masks, enter the ip
show-subnet-length command at the global CONFIG level of the CLI. You can use the CIDR format to
configure the ACL entry regardless of whether the software is configured to display the masks in
CIDR format.

Virtual ADX (config)#int eth 2/1

Virtual ADX (config-if-2/1)#ip access-group 103 in

Virtual ADX (config-if-2/1)#exit

Virtual ADX (config)#int eth 2/2

Virtual ADX (config-if-2/2)#ip access-group 103 in

Virtual ADX (config)#write memory

Advertising