1.实验内容
拓扑图
3.配IP
由图可知R1只有一个共有ip,所以必须采用一对多进行配置
[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]q
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/2]nat outbound 2000
配置服务器
DNS
端口映射
[r1-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 80 ins
ide 192.168.1.5 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 80 ins
ide 192.168.1.6 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 80 ins
ide 12.1.1.1 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
client1访问http1.http2
[r2-GigabitEthernet0/0/0]nat server protocol tcp global current-interface 80 ins
ide 192.168.1.5 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
Info: The NAT in the network has existed.
Already existing configuration will be covered with current configure. [Y/N]:
y
[r2-GigabitEthernet0/0/0]nat server protocol tcp global current-interface 80 ins
ide 192.168.1.6 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
Info: The NAT in the network has existed.
Already existing configuration will be covered with current configure. [Y/N]:
y