华为S5700单向访问
实验需求
工作组A可以访问工作组B,但是工作组B无法访问工作组A
地址规划
核心SW1: vlan10网关为192.168.1.1/24 vlan20网关为192.168.2.1/24
工作组A: 192.168.1.0/24 属于vlan 10
工作组B: 192.168.2.0/24 属于vlan 20
接入SW2配置
<Huawei>system-view [Huawei]sysname SW2 [SW2]vlan 10 #创建vlan10 [SW2-vlan10]quit [SW2]int e0/0/1 [SW2-Ethernet0/0/1]port link-type trunk #将上联接口e0/0/1设为trunk [SW2-Ethernet0/0/1]port trunk allow-pass vlan 10 #允许vlan10的数据透传 [SW2-Ethernet0/0/1]quit [SW2]int e0/0/2 [SW2-Ethernet0/0/2]port link-type access #将下联接口e0/0/2设为access [SW2-Ethernet0/0/2]port default vlan 10 #让接口属于vlan10
接入SW3配置
<Huawei>system-view [Huawei]sysname SW3 [SW3]vlan 20 #创建vlan20 [SW3-vlan20]quit [SW3]int e0/0/1 [SW3-Ethernet0/0/1]port link-type trunk #将上联接口e0/0/1设为trunk [SW3-Ethernet0/0/1]port trunk allow-pass vlan 20 #允许vlan20的数据透传 [SW3-Ethernet0/0/1]quit [SW3]int e0/0/2 [SW3-Ethernet0/0/2]port link-type access #将下联接口e0/0/2设为access [SW3-Ethernet0/0/2]port default vlan 20 #让接口属于vlan20
核心SW1配置
<Huawei>system-view [Huawei]sysname SW1 [SW1]vlan bat 10 20 #批量创建vlan10和20 配置接口 [SW1]interface g0/0/1 [SW1-GigabitEthernet0/0/1]port link-type trunk #将下联SW2接口设为trunk [SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 #只允许透传vlan10信息 [SW1-GigabitEthernet0/0/1]quit [SW1]interface g0/0/2 [SW1-GigabitEthernet0/0/2]port link-type trunk #将下联SW3接口设为trunk [SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 20 #只允许透传vlan20信息 [SW1-GigabitEthernet0/0/2]quit
配置vlan [SW1]int vlan 10 [SW1-Vlanif10]ip address 192.168.1.1 24 [SW1-Vlanif10]quit [SW1]int vlan 20 [SW1-Vlanif20]ip address 192.168.2.1 24 [SW1-Vlanif20]quit
配置dhcp [SW1]dhcp enable #启用全局dhcp [SW1]ip pool 10 #创建地址池10 [SW1-ip-pool-10]network 192.168.1.0 mask 255.255.255.0 #指定网段 [SW1-ip-pool-10]dns-list 8.8.8.8 #指定dns [SW1-ip-pool-10]gateway-list 192.168.1.1 #指定网关 [SW1-ip-pool-10]lease day 10 #指定租约 [SW1]ip pool 20 #创建地址池20 [SW1-ip-pool-20]network 192.168.2.0 mask 255.255.255.0 [SW1-ip-pool-20]dns-list 8.8.8.8 [SW1-ip-pool-20]gateway-list 192.168.2.1 [SW1-ip-pool-20]lease day 10 [SW1]int vlan 10 [SW1-Vlanif10]dhcp select global #调用全局dhcp信息 [SW1]int vlan 20 [SW1-Vlanif10]dhcp select global
互通检查
工作组获得IP情况
PING网关
PING对方网关
PING对端工作组
单向访问设置
#创建2条高级访问控制列表 [SW1]acl number 3001 [SW1-acl-adv-3001]rule 0 permit tcp source 192.168.2.0 0.0.0.255 destination 192.168.1.0 0.0.0.255 tcp-flag ack #匹配TCP连接ack报文 [SW1]acl number 3002 [SW1-acl-adv-3002]rule 0 permit tcp source 192.168.2.0 0.0.0.255 destination 192.168.1.0 0.0.0.255 tcp-flag syn #匹配TCP连接syn报文
#创建流分类并匹配 [SW1]traffic classifier 3001 [SW1-classifier-3001]if-match acl 3001 [SW1]traffic classifier 3002 [SW1-classifier-3002]if-match acl 3002
#创建流行为,允许带有ack标志位的TCP连接报文,丢弃TCP连接syn报文 [SW1]traffic behavior 3001 [SW1-behavior-3001]permit [SW1]traffic behavior 3002 [SW1-behavior-3002]deny
#创建Qos策略关联流分类和流行为。 [SW1]traffic policy 3000 [SW1-trafficpolicy-3000]classifier 3001 behavior 3001 [SW1-trafficpolicy-3000]classifier 3002 behavior 3002
#Vlan20端口入方向下发Qos策略 [SW1]interface GigabitEthernet 0/0/2 [SW1-GigabitEthernet0/0/2]traffic-policy 3000 inbound
本站所有文章均可随意转载,转载时请保留原文链接及作者。