24 · Explaining the Basics of ACL說明 ACL 的基礎

ACL OverviewACL 概觀

ACLs are among the most commonly used features of Cisco IOS Software. ACLs are often associated with the control of packets traveling in and out of a router interface. However, there are many different applications of ACLs. For example, they can also be used to control route advertisements, to specify interesting traffic for a VPN, and to limit debug output.

ACL 是 Cisco IOS 軟體中最常用的功能之一。ACL 經常與控制封包進出路由器介面有關。然而,ACL 有許多不同的應用方式。例如,它們也可以用來控制路由通告、指定 VPN 的感興趣流量,以及限制 debug 輸出。

An ACL in isolation is a series of statements that specify traffic selection criteria. By using an ACL, an administrator defines packet selection criteria, which are also called matching rules. Matches are based on information found in packet headers. Along with the matching rule, an administrator defines a permit or deny action for the packets that meet the criteria. You can interpret the permit action as "include into selection" and the deny action as "do not include into selection". What is done with selected packets depends on how the ACL is applied at the device.

單就 ACL 本身而言,它是一系列指定流量選取標準的陳述式。管理員透過使用 ACL 來定義封包選取標準,這些標準也稱為比對規則。比對是根據封包標頭中的資訊進行的。除了比對規則之外,管理員還會為符合條件的封包定義允許(permit)或拒絕(deny)動作。你可以將允許動作理解為「納入選取」,將拒絕動作理解為「不納入選取」。至於選取到的封包會如何處理,則取決於 ACL 在裝置上的套用方式。

ACLs are supported on a wide range of products including routers and switches.

ACL 在包括路由器與交換器在內的各種產品上皆受支援。

The example in the figure shows two access lists: access list 15 and access list PING_BLOCK. Both access lists contain a sequence of commands. Each command contains an action, indicated by the red font, and a rule for matching packets, indicated by the blue font. The actions are either permit or deny. The ordering of statements is indicated by the number at the front of the row. At this point, it is enough to identify the general structure of an access list. The details of the syntax will be explained.

圖中的範例顯示了兩個存取清單:access list 15 與 access list PING_BLOCK。這兩個存取清單都包含一系列命令。每個命令都包含一個動作(以紅色字體標示)以及一個封包比對規則(以藍色字體標示)。動作不是允許就是拒絕。陳述式的順序由每列前方的編號指示。目前,只需了解存取清單的一般結構即可,語法細節稍後會說明。

One of the common applications of ACLs is traffic filtering. By default, a device does not have ACLs configured; therefore, a device does not filter traffic. For instance, traffic that enters the router is routed solely based on information within the routing table. However, when an ACL is applied to an interface, the router performs the additional task of evaluating all network packets against the ACL as they pass through the interface to determine if the packet can be forwarded.

ACL 常見的應用之一是流量過濾。裝置預設不會設定 ACL,因此不會過濾流量。舉例來說,進入路由器的流量僅根據路由表中的資訊來路由。然而,當 ACL 套用到某個介面時,路由器會多執行一項工作:在封包通過該介面時,依據 ACL 逐一評估所有網路封包,以判斷該封包是否可以被轉送。

When used for traffic filtering, ACLs provide these features:

當用於流量過濾時,ACL 提供以下功能:

  • Limit network traffic to increase network performance. For example, if a corporate policy does not allow video traffic on the network, ACLs that block video traffic could be configured and applied. This action would greatly reduce the network load and increase network performance.限制網路流量以提升網路效能。例如,若公司政策不允許網路上有影片流量,就可以設定並套用會阻擋影片流量的 ACL。這樣的動作能大幅降低網路負載,提升網路效能。
  • Provide traffic flow control. For example, ACLs are used for traffic prioritizing or to limit certain type of traffic.提供流量控管。例如,ACL 可用於流量優先順序排定,或限制特定類型的流量。
  • Provide a basic level of security for network access. ACLs can allow one host to access a part of the network and prevent another host from accessing the same part. For example, access to the Human Resources network can be restricted to specific users.為網路存取提供基本層級的安全性。ACL 可以允許某台主機存取網路的某個部分,同時阻止另一台主機存取相同部分。例如,可將人力資源網路的存取限制給特定使用者。
  • Filter traffic based on traffic type. For example, an ACL can permit email traffic but block all Telnet traffic.根據流量類型過濾流量。例如,ACL 可以允許電子郵件流量,但封鎖所有 Telnet 流量。
  • Screen hosts to permit or deny access to network services. For example, ACLs can permit or deny a user access to FTP or HTTP servers.篩選主機,以允許或拒絕存取網路服務。例如,ACL 可以允許或拒絕使用者存取 FTP 或 HTTP 伺服器。

In addition to either permitting or denying traffic, ACLs can be used for selecting types of traffic to be analyzed, forwarded, or processed in other ways. For example, ACLs can be used to classify traffic to enable priority processing. This capability is similar to having a VIP pass at a concert or sporting event. The VIP pass gives selected guests privileges not offered to general admission ticket holders, such as priority entry or being able to enter a restricted area.

除了允許或拒絕流量之外,ACL 還可用來選取要分析、轉送或以其他方式處理的流量類型。例如,ACL 可用來分類流量以啟用優先處理,這類似於演唱會或體育賽事的 VIP 通行證。VIP 通行證讓被選中的來賓享有一般入場券持有者所沒有的特權,例如優先入場或能夠進入限制區域。

Which three options are uses of an ACL? (Choose three.)以下哪三個選項是 ACL 的用途?(選三項。)