配置如下:
一、 组网需求: 2个网段通过一台H3CS5500,要求网段A可以访问网段B和C,网段B、C不能访问网段A。
[H3C]vlan 1
[H3C-vlan1]port GigabitEthernet 1/0/1 to GigabitEthernet 1/0/18
[H3C-vlan1]quit [H3C]interface Vlan-interface 1
[H3C-Vlan-interface1]ip address 192.168.1.1 24
[H3C-Vlan-interface1]quit
[H3C]vlan 2
[H3C-vlan2]port GigabitEthernet 1/0/19 to GigabitEthernet 1/0/20
[H3C-vlan2]quit
[H3C]interface Vlan-interface 2
[H3C-Vlan-interface2]ip address 192.168.77.1 24
[H3C-Vlan-interface2]quit
[H3C]vlan 3
[H3C-vlan3]port GigabitEthernet 1/0/21 to GigabitEthernet 1/0/24
[H3C-vlan3]quit
[H3C]interface Vlan-interface 3
[H3C-Vlan-interface3]ip address 192.168.0.1 24
[H3C-Vlan-interface3]quit
#创建ACL,其中第1条匹配带有ack标志位的TCP连接报文,第2条匹配TCP连接syn报文
[H3C]acl number 3001
[H3C-acl-adv-3001]rule 0 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.0.0 0.0.0.255
[H3C-acl-adv-3001]rule 1 permit ip source 192.168.77.0 0.0.0.255 destination 192.168.0.0 0.0.0.255
[H3C-acl-adv-3001]quit
[H3C]acl number 3002
[H3C-acl-adv-3002]rule 0 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255
[H3C-acl-adv-3002]rule 1 permit ip source 192.168.77.0 0.0.0.255 destination 192.168.0.0 0.0.0.255
#创建流分类,匹配相应的ACL
[H3C]traffic classifier 3001
[H3C-classifier-3001]if-match acl 3001
[H3C-classifier-3001]quit
[H3C]traffic classifier 3002
[H3C-classifier-3002]if-match acl 3002
#创建流行为,permit 带有ack标志位的TCP连接报文,deny TCP连接syn报文。
[H3C]traffic behavior 3001
[H3C-behavior-3001]filter permit
[H3C-behavior-3001]quit
[H3C]traffic behavior 3002
[H3C-behavior-3002]filter deny
#创建Qos策略,关联流分类和流行为。
[H3C]qos policy 3000
[H3C-qospolicy-3000]classifier 3001 behavior 3001
[H3C-qospolicy-3000]classifier 3002 behavior 3002
#在Vlan 200端口入方向下发Qos策略
[H3C]interface VLAN 3
[H3C-interface VLAN 3]qos apply policy 3000 inbound
/************应用策略无效果 应用策略无效果 应用策略无效果 应用策略无效果************/
(0)
最佳答案
此种方法只能对tcp连接生效,对ping和udp无法实现
改为:
[H3C]acl number 3001
[H3C-acl-adv-3001]rule 0 permit tcp established source 192.168.1.0 0.0.0.255 destination 192.168.0.0 0.0.0.255
[H3C-acl-adv-3001]rule 1 permit tcp established source 192.168.77.0 0.0.0.255 destination 192.168.0.0 0.0.0.255
[H3C-acl-adv-3001]quit
[H3C]acl number 3002
[H3C-acl-adv-3002]rule 0 permit tcp source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255
[H3C-acl-adv-3002]rule 1 permit tcp source 192.168.77.0 0.0.0.255 destination 192.168.0.0 0.0.0.255
[H3C]interface VLAN 1
[H3C-interface VLAN 1]qos apply policy 3000 inbound
[H3C]interface VLAN 2
[H3C-interface VLAN 2]qos apply policy 3000 inbound
只能过滤tcp的报文
(0)
那请问下如何修改呢,能不能帮忙修改下发给我,谢谢!整了一天了..........
哪个是A哪个网段是B和C
改为: [H3C]acl number 3001 [H3C-acl-adv-3001]rule 0 permit tcp established source 192.168.1.0 0.0.0.255 destination 192.168.0.0 0.0.0.255 [H3C-acl-adv-3001]rule 1 permit tcp established source 192.168.77.0 0.0.0.255 destination 192.168.0.0 0.0.0.255 [H3C-acl-adv-3001]quit [H3C]acl number 3002 [H3C-acl-adv-3002]rule 0 permit tcp source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255 [H3C-acl-adv-3002]rule 1 permit tcp source 192.168.77.0 0.0.0.255 destination 192.168.0.0 0.0.0.255 [H3C]interface VLAN 1 [H3C-interface VLAN 1]qos apply policy 3000 inbound [H3C]interface VLAN 2 [H3C-interface VLAN 2]qos apply policy 3000 inbound 只能过滤tcp的报文
那您要确认下共享是tcp的连接还是udp的
那我UPD也做策略是不是这样 [H3C-acl-adv-3001]rule 0 permit tcp established source 192.168.1.0 0.0.0.255 destination 192.168.0.0 0.0.0.255 [H3C-acl-adv-3001]rule 1 permit tcp established source 192.168.77.0 0.0.0.255 destination 192.168.0.0 0.0.0.255 [H3C-acl-adv-3001]rule 2 permit udp established source 192.168.1.0 0.0.0.255 destination 192.168.0.0 0.0.0.255 [H3C-acl-adv-3001]rule 3 permit udp established source 192.168.77.0 0.0.0.255 destination 192.168.0.0 0.0.0.255 [H3C-acl-adv-3001]quit [H3C]acl number 3002 [H3C-acl-adv-3002]rule 0 permit tcp source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255 [H3C-acl-adv-3002]rule 1 permit tcp source 192.168.77.0 0.0.0.255 destination 192.168.0.0 0.0.0.255 [H3C-acl-adv-3002]rule 2 permit upd source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255 [H3C-acl-adv-3002]rule 3 permit upd source 192.168.77.0 0.0.0.255 destination 192.168.0.0 0.0.0.255
UDP实现不了单向访问
客气
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
客气