还是山石SG6000,使用命令配置,看着更简单。
拓扑图还是之前的:
进来需要先修改密码
端口配置
G0/1 作为外网端口,untrust,自动获取地址。
G0/2 作为内外端口,trust,配置地址:192.168.50.1.
配置外网口
SG-6000#
SG-6000# conf
SG-6000(config)# interface e0/1
SG-6000(config-if-eth0/1)# zone untrust
SG-6000(config-if-eth0/1)# ip add dhcp
SG-6000(config-if-eth0/1)# manage ping
SG-6000(config-if-eth0/1)# manage ssh
SG-6000(config-if-eth0/1)# manage https
SG-6000(config-if-eth0/1)# exit
如图:
内网口
SG-6000(config-if-eth0/1)#
SG-6000(config-if-eth0/1)# int e0/2
SG-6000(config-if-eth0/2)#
SG-6000(config-if-eth0/2)# zone trust
SG-6000(config-if-eth0/2)#
SG-6000(config-if-eth0/2)# ip add 192.168.50.1 255.255.255.0
SG-6000(config-if-eth0/2)#
SG-6000(config-if-eth0/2)# manage ping
SG-6000(config-if-eth0/2)# manage ssh
SG-6000(config-if-eth0/2)# manage https
如图:
配置默认路由
SG-6000#
SG-6000# conf
SG-6000(config)# ip vroute trust-vr
SG-6000(config-vrouter)# ip route 0.0.0.0/0 192.168.30.1
因为外网口是DHCP,网关是192.168.30.1。
SG-6000(config-vrouter)#
配置DHCP
SG-6000(config)# dhcp-server pool 50
SG-6000(config-dhcp-server)# address 192.168.50.10 192.168.50.200
SG-6000(config-dhcp-server)# gateway 192.168.50.1
SG-6000(config-dhcp-server)# netmask 255.255.255.0
SG-6000(config-dhcp-server)# lease 3600
SG-6000(config-dhcp-server)# dns 114.114.114.114 8.8.8.8
SG-6000(config-dhcp-server)# domain dongzao.com
SG-6000(config-dhcp-server)# auto-config interface e0/1
应用到接口
SG-6000(config)# interface ethernet0/2
SG-6000(config-if-eth0/2)# dhcp-server enable pool 50
源NAT配置
使用命令还是非常简单的!
SG-6000(config-vrouter)# snatrule from any to any service any eif e0/1 trans-to eif-ip mode dynamicport
如图:
配置安全策略
SG-6000(config)# rule from any to any service any permit
检查一下
查看接口
SG-6000(config)# show interface
查看路由
SG-6000(config)# show ip route
查看dhcp
查看源nat
SG-6000(config)# show snat
查看策略
SG-6000(config)# show policy
评论区