欢迎进入华为社区论坛,与200万技术人员互动交流 >>进入 现象描述:
网络设备:1台USG2130,若干S2300交换机
客户需求:交换机上划分VLAN,并在USG2130上做单臂路由,同时要求VLAN30能访问VLAN10、 VLAN20;但是VLAN10和VLAN20都不能访问VLAN30。
原因分析: 由于USG2130仅有一个三层接口WAN口,支持子接口的端口也是WAN口(即E0/0/0),基于目前需求,现须将该端口作为内网接口。再通过创建VLAN,将其中一个VLAN接口作为互联网接口。
若将各VLAN放在同一个区域,实现VLAN间访问控制比较复杂。若将各VLAN子接口划分到不同的区域,通过域间包滤的方式实现,既简单又可靠。
处理过程: 重要配置如下:
1、进入子接口,配置IP地址,并进行802.1Q封装。
[USG2130]int e0/0/0.1
[USG2130-Ethernet0/0/0.1]description VLAN10
[USG2130-Ethernet0/0/0.1]ip address 192.168.1.1 24
[USG2130-Ethernet0/0/0.1]vlan-type dot1q 10
[USG2130][USG2130]int e0/0/0.2
[USG2130-Ethernet0/0/0.2]description VLAN20
[USG2130-Ethernet0/0/0.2]ip add 192.168.2.1 24
[USG2130-Ethernet0/0/0.2]vlan-type dot1q 20
[USG2130]int e0/0/0.3
[USG2130-Ethernet0/0/0.3]description VLAN30
[USG2130-Ethernet0/0/0.3]ip add 192.168.3.1 24
[USG2130-Ethernet0/0/0.3]vlan-type dot1q 30
2、创建用于连接互联网的VLAN,并配置IP。
[USG2130]vlan 3
[USG2130-vlan3]description WAN
[USG2130]int e1/0/0
[USG2130-Ethernet1/0/0]port access vlan 3
[USG2130]int vlan 3
[USG2130-Vlanif3]description TO-INTERNET
[USG2130-Vlanif3]ip add 100.100.100.1 30
3、自定义三个区域,并将各VLAN子接口加入区域,将Vlanif 3加入untrust区域
[USG2130]firewall zone name lan1
[USG2130-zone-lan1]set priority 60
[USG2130-zone-lan1]add interface e0/0/0.1
[USG2130]firewall zone name lan2
[USG2130-zone-lan2]set priority 65
[USG2130-zone-lan2]add interface e0/0/0.2
[USG2130]firewall zone name lan3
[USG2130-zone-lan3]set priority 70
[USG2130-zone-lan3]add interface e0/0/0.3
[USG2130]firewall zone untrust
[USG2130-zone-untrust]add interface vlan3
4、创建用于VLAN间访问控制的ACL,并应用于VLAN所在区域间。
[USG2130]acl 3001
[USG2130-acl-adv-3001]rule permit ip source 192.168.3.0 0.0.0.255
[USG2130]acl 3002
[USG2130-acl-adv-3002]rule deny ip source 192.168.1.0 0.0.0.255 destination 192.168.3.0 0.0.0.255
[USG2130-acl-adv-3002]rule deny ip source 192.168.2.0 0.0.0.255 destination 192.168.3.0 0.0.0.255
[USG2130-acl-adv-3002]rule permit ip
[USG2130]firewall interzone lan1 lan3
[USG2130-interzone-lan3-lan1]packet-filter 3001 outbound
[USG2130-interzone-lan3-lan1]packet-filter 3001 inbound
[USG2130]firewall interzone lan2 lan3
[USG2130-interzone-lan3-lan2]packet-filter 3001 outbound
[USG2130-interzone-lan3-lan2]packet-filter 3002 inbound
5、(可选)改变接口Ethernet0/0/0的区域
[USG2130-Vlanif3]fire zone untrust
[USG2130-zone-untrust]undo add interface e0/0/0
[USG2130-zone-untrust]firewall zone trust
[USG2130-zone-trust]add interface e0/0/0
6、完成NAT配置
[USG2130-zone-trust]acl 2000
[USG2130-acl-basic-2000]rule permit source 192.168.0.0 0.0.0.3
[USG2130]firewall interzone trust untrust
[USG2130-interzone-trust-untrust]nat outbound 2000 interface vlan 3
建议/总结: 由于网络设备受限,为了满足特殊需要不得不打破常规的设置和规划,巧妙运用USG2130等同类型防火墙的自定义区域、域间包过滤和VLAN功能。
华赛USG2130 用WAN口做单臂路由及VLAN间访问控制
分享到:
正在招生
友情链接