23-報文過濾快速配置指南
本章節下載 (191.74 KB)
報文過濾配置快速配置指南
Copyright © 2024 bobty下载软件 版權所有,保留一切權利。
非經本公司書麵許可,任何單位和個人不得擅自摘抄、複製本文檔內容的部分或全部,並不得以任何形式傳播。
除bobty下载软件 的商標外,本手冊中出現的其它公司的商標、產品標識及商品名稱,由各自權利人擁有。
本文檔中的信息可能變動,恕不另行通知。
本案例介紹報文過濾的配置方法。
如1.2 圖1所示,某公司的網絡分成管理部、研發部和服務器三個區域,通過Device設備與Internet連接。現要求通過ACL實現:
· 管理部任意時間都可以訪問Internet和服務器,但不能訪問研發部;
· 研發部隻能訪問服務器,不能訪問Internet和管理部。
圖1 通過IP地址過濾流量配置組網圖
(1) 配置管理部的網絡權限
# 創建IPv4高級ACL 3000。
<Device> system-view
[Device] acl advanced 3000
# 創建規則,過濾目的地址為10.1.2.0/24網段的報文。
[Device-acl-ipv4-adv-3000] rule deny ip destination 10.1.2.0 0.0.0.255
[Device-acl-ipv4-adv-3000] quit
# 配置包過濾功能,應用IPv4高級ACL 3000對端口GigabitEthernet1/0/4收到的IP報文進行過濾。
[Device] interface gigabitethernet 1/0/4
[Device-GigabitEthernet1/0/4] packet-filter 3000 inbound
[Device-GigabitEthernet1/0/4] quit
(2) 配置研發部的網絡權限
# 創建IPv4高級ACL 3001。
[Device] acl advanced 3001
# 創建規則,允許目的地址為10.2.1.0/24網段的報文通過。
[Device-acl-ipv4-adv-3001] rule permit ip destination 10.2.1.0 0.0.0.255
# 創建規則,不允許目的地址為其他網段的報文通過。
[Device-acl-ipv4-adv-3001] rule deny ip
# 配置包過濾功能,應用IPv4高級ACL 3001對端口GigabitEthernet1/0/3收到的IP報文進行過濾。
[Device] interface gigabitethernet 1/0/3
[Device-GigabitEthernet1/0/3] packet-filter 3001 inbound
[Device-GigabitEthernet1/0/3] quit
# 執行display packet-filter命令查看包過濾功能的應用狀態。
[Device] display packet-filter interface inbound
Interface: GigabitEthernet1/0/3
Inbound policy:
IPv4 ACL 3001
Interface: GigabitEthernet1/0/4
Inbound policy:
IPv4 ACL 3000
上述信息顯示GigabitEthernet1/0/3和GigabitEthernet1/0/4端口上已經正確應用了包過濾功能。
# 從研發部的某台電腦上ping Internet上某個網站,結果無法ping通。
C:\>ping www.google.com
Pinging www.google.com [172.217.194.99] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 173.194.127.242:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
C:\>
# 從研發部的某台電腦上ping 10.2.1.10服務器的某台設備,可以ping通。
C:\>ping 10.2.1.10
Ping 192.168.1.60 (10.2.1.10): 56 data bytes, press CTRL+C to break
56 bytes from 10.2.1.10: icmp_seq=0 ttl=255 time=12.963 ms
56 bytes from 10.2.1.10: icmp_seq=1 ttl=255 time=4.168 ms
56 bytes from 10.2.1.10: icmp_seq=2 ttl=255 time=7.390 ms
56 bytes from 10.2.1.10: icmp_seq=3 ttl=255 time=3.363 ms
56 bytes from 10.2.1.10: icmp_seq=4 ttl=255 time=2.901 ms
C:\>
# 從管理部的某台電腦上ping Internet上某個網站,結果可以ping通。
C:\>ping www.google.com
Pinging www.google.com [172.217.194.99] with 32 bytes of data:
Reply from 172.217.194.99: bytes=32 time=30ms TTL=50
Reply from 172.217.194.99: bytes=32 time=30ms TTL=50
Reply from 172.217.194.99: bytes=32 time=30ms TTL=50
Reply from 172.217.194.99: bytes=32 time=30ms TTL=50
Ping statistics for 172.217.194.99:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 30ms, Maximum = 30ms, Average = 30ms
C:\>
#
interface Ten-GigabitEthernet1/0/3
port link-mode bridge
packet-filter 3001 inbound
#
interface Ten-GigabitEthernet1/0/4
port link-mode bridge
packet-filter 3000 inbound
#
acl advanced 3000
rule 0 deny ip destination 10.1.2.0 0.0.0.255
#
acl advanced 3001
rule 0 permit ip destination 10.2.1.0 0.0.0.255
rule 5 deny ip
#
· 產品配套“ACL和QoS配置指導”中的“ACL”。
· 產品配套“ACL和QoS命令參考”中的“ACL”。
不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!