你的位置:首页 > 信息动态 > 新闻中心
信息动态
联系我们

ensp:NAT相关实验

2022/1/1 2:31:03

实验要求:

实验步骤:

1.如图建立拓朴

2.配置IPS

[ISP]int g0/0/0

[ISP-GigabitEthernet0/0/0]ip add 12.1.1.2 24

[ISP-GigabitEthernet0/0/0]int g0/0/1

[ISP-GigabitEthernet0/0/1]ip add 1.1.1.1 24

3.配置r1

[r1-GigabitEthernet0/0/1]ip add 12.1.1.1 24
[r1-GigabitEthernet0/0/0]ip add 192.168.1.1 24

给r1配置缺省路由
[r1]ip route-static 0.0.0.0 0 12.1.1.2

 4.配置边界路由器公网接口

[r1-GigabitEthernet0/0/1]nat static global 12.1.1.3 inside 192.168.1.2


[r1-GigabitEthernet0/0/1]undo nat static global 12.1.1.3 inside 192.168.1.2
[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.0.0 0.0.255.255
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]nat outbound 2000

[r1-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 80 ins
ide 192.168.1.3 80
Warning:The port 80 is well-known port. If you continue it may cause function fa
ilure.
Are you sure to continue?[Y/N]:y

[r1-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 800 in
side 192.168.1.4 80
Warning:The port 800 is well-known port. If you continue it may cause function f
ailure.
Are you sure to continue?[Y/N]:y

5.配置pc端

 6.配置client和server

 7.测试

PC1可以正常ping通PC2

 CLIENT可以通过http访问到两台SERVER

 CLIENT可以通过域名访问其中一台SERVER