网络设备:1台USG2130,若干S2700交换机
 
客户需求:交换机上划分VLAN,并在USG2130上做单臂 路由,同时要求三个网段之间可以互访,而且三个网段都是可以上INTERNET
 
由于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]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]interface Ethernet1/0/0
[USG2130-Ethernet1/0/0]ip address 192.168.100.1 24
[USG2130-Ethernet1/0/0]description TO-INTERNET
 
3、将端口分别加入对应的区域
[USG2130]firewwall zone trust
[USG2130-zone-trust]add interface e0/0/0.1
[USG2130-zone-trust]add interface e0/0/0.2
[USG2130-zone-trust]add interface e0/0/0.3
[USG2130]firewall zone untrust
[USG2130-zone-untrust]add interface e1/0/0
 
4、完成NAT配置
[USG2130]firewall interzone trust untrust outbound
[USG2130-interzone-trust-untrust]policy 10
[USG2130-interzone-trust-untrust-policy10]source 192.168.0.0 255.255.0.0
 
 
5、在交换机和防火墙之间连接的端口可以直接使用TRUNK端口,其他VLAN的配置和VLAN的配置一样,这样就可以通过防火墙进行VLAN间的通信。