防火墙的配置(Web服务端):
g1/0/1:
g1/0/0:
g1/0/2(网关指向上面的ISP服务器):
防火墙下面的交换机配置(使用三层):
[SW1]vlan 10
[SW1]int Vlanif 10
[SW1-Vlanif10]ip add 12.0.0.2 24
[SW1]int g0/0/1
[SW1-GigabitEthernet0/0/1]port link-type access
[SW1-GigabitEthernet0/0/1]port default vlan 10 #与防火墙相接的接口
[SW1]int Vlanif 100
[SW1-Vlanif100]ip add 192.168.1.1 24
[SW1]int g0/0/2
[SW1-GigabitEthernet0/0/2]port link-type access
[SW1-GigabitEthernet0/0/2]port default vlan 100 #作为192.168.1.0/24的网关
[SW1]int Vlanif 200
[SW1-Vlanif100]ip add 192.168.2.1 24
[SW1]int g0/0/3
[SW1-GigabitEthernet0/0/2]port link-type access
[SW1-GigabitEthernet0/0/2]port default vlan 100 #作为192.168.2.0/24的网关
[SW1]int Vlanif 300
[SW1-Vlanif100]ip add 192.168.3.1 24
[SW1]int g0/0/4
[SW1-GigabitEthernet0/0/2]port link-type access
[SW1-GigabitEthernet0/0/2]port default vlan 100 #作为192.168.3.0/24的网关
[SW1]int Vlanif 400
[SW1-Vlanif100]ip add 192.168.4.1 24
[SW1]int g0/0/5
[SW1-GigabitEthernet0/0/2]port link-type access
[SW1-GigabitEthernet0/0/2]port default vlan 100 #作为192.168.4.0/24的网关