设置方法比较简单:
如果临时使用的交换机SW不支持VLAN,则可以在路由器内网端口上使用secondary address,注意这样做会把DMZ跟内网出口混在一起,要在内网多层交换机上设置好访问控制列表,阻止通过DMZ入侵内网。配置形如:
interface FastEthernet0/0
ip address 202.1.1.1 255.255.255.252
ip access-group 101 in
ip nat outside
!
interface FastEthernet1/0
ip address 192.168.1.254 255.255.255.0 secondary
ip address 10.0.0.1 255.255.255.0
ip nat inside
!
ip nat pool inet 202.2.2.1 202.2.2.9 netmask 255.255.255.0
ip nat inside source list 1 pool inet overload ip nat inside source static 192.168.1.230 202.2.2.230 ip nat inside source static 192.168.1.231 202.2.2.231
ip classless ip route 0.0.0.0 0.0.0.0 202.1.1.2 ip route 10.0.0.0 255.0.0.0 10.0.0.254 \\ 横线地方区别好两个不同的内网出去的方法
!
access-list 1 permit 10.0.0.0 0.0.0.255
access-list 101 permit tcp any any established
access-list 101 permit tcp any host 202.2.2.230 eq domain
access-list 101 permit tcp any host 202.2.2.231 eq www