Working with decimal representations of binary wildcard mask bits can be tedious. To make configuration easier and to improve readability when viewing an access list, the most commonly used wildcard masks are represented by the keywords host and any.
處理萬用字元遮罩位元的十進位表示法可能相當繁瑣。為了讓設定更簡便、並在檢視存取清單時更容易閱讀,最常用的萬用字元遮罩可以用關鍵字 host 與 any 來表示。
The host keyword is equal to the wildcard mask 0.0.0.0. The host keyword and all-zeros mask require all bits of the IPv4 address to match the reference IPv4 address.
host 關鍵字等同於萬用字元遮罩 0.0.0.0。host 關鍵字與全零遮罩都要求 IPv4 位址的所有位元都必須與參考 IPv4 位址相符。
The any keyword is equal to the wildcard mask 255.255.255.255. The any keyword and all-ones mask do not require any of the IPv4 address bits to match the reference IPv4 address.
any 關鍵字等同於萬用字元遮罩 255.255.255.255。any 關鍵字與全一遮罩都不要求 IPv4 位址的任何位元與參考 IPv4 位址相符。
When using the host keyword to specify a matching rule, use the keyword before the reference IPv4 address.
使用 host 關鍵字指定比對規則時,該關鍵字要寫在參考 IPv4 位址之前。
When using the any keyword, the keyword alone is enough, you do not specify the reference IPv4 address.
使用 any 關鍵字時,只需要這個關鍵字本身即可,不需要再指定參考 IPv4 位址。
In the example, you can see how the keyword host and any are used. Instead of typing 172.30.16.5 0.0.0.0, you can type host 172.30.16.5. Instead of typing 172.30.16.5 255.255.255.255, you can type the any keyword. Note that 0.0.0.0 255.255.255.255 is equivalent to any; thus you could type any reference IPv4 address with the wildcard mask 255.255.255.255, and it would indeed match any address.
在範例中,你可以看到關鍵字 host 與 any 的用法。不必輸入 172.30.16.5 0.0.0.0,你可以輸入 host 172.30.16.5。不必輸入 172.30.16.5 255.255.255.255,你可以輸入 any 關鍵字。請注意,0.0.0.0 255.255.255.255 等同於 any;因此,你其實可以輸入任何參考 IPv4 位址搭配萬用字元遮罩 255.255.255.255,結果都會等同於比對任何位址。
Note how using keywords shortens the matching rule, making it easier to read and interpret ACL statement.
請注意使用關鍵字如何簡化比對規則,使 ACL 陳述式更容易閱讀與理解。
If a wildcard mask is omitted in the matching criteria in a standard IPv4 ACL, a wildcard mask of 0.0.0.0 is assumed.
若在標準 IPv4 ACL 的比對條件中省略萬用字元遮罩,系統會假設萬用字元遮罩為 0.0.0.0。
