NAT综合实验
模拟企业真实上网和服务器发布到公网需求。
拓扑图如图所示:
其中需要把云连接的网卡配置成对应的网段:
其中云的配置如图:
有以下三个注意事项:
1.添加以太网后需要重启系统
2.关闭防火墙
3.环回网卡ping不通,可能是防火墙没有关闭或者ip地址配错
其中相关配置命令如下:
二层交换机的配置命令:
LSW2:
system-view
vlan batch 6 7 8
int e0/0/1
port link-type access
port default vlan 6
int e0/0/3
port link-type access
port default vlan 7
int e0/0/4
port link-type access
port default vlan 8
int e0/0/5
port link-type access
port default vlan 8
int e0/0/2
port link-type trunk
port trunk allow-pass vlan 6 7 8
路由器的配置命令:
AR2:
system-view
int g0/0/1
ip address 6.6.6.1 29
int g0/0/2.1
dot1q termination vid 6
ip address 192.168.8.1 24
arp broadcast enable
int g0/0/2.2
dot1q termination vid 7
ip address 192.168.7.1 24
arp broadcast enable
int g0/0/2.3
dot1q termination vid 8
ip address 192.168.6.1 24
arp broadcast enable
ip route-static 0.0.0.0 0.0.0.0 6.6.6.6
acl 2000
rule permit source 192.168.8.0 0.0.0.255
rule permit source 192.168.7.0 0.0.0.255
rule permit source 192.168.6.0 0.0.0.255
rule deny source any
nat address-group 1 6.6.6.2 6.6.6.5
int g0/0/1
nat outbound 2000 address-group 1 no-pat
int g0/0/1
nat server protocol tcp global 6.6.6.5 www inside 192.168.6.200 www
nat server protocol tcp global 6.6.6.5 ftp inside 192.168.6.100 ftp
接下来完善PC机的基本配置:
最后进行测试:
以上均为个人的想法,具体情况具体分析。
菜菜的代码,希望能够帮助到你哟!