如图所示
为各个设备配置ip
在r1上进行一对多的配置
r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]q
[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]
[r1-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 8888 i
nside 192.168.1.4 80
pc1正常ping通pc2:
cllent1访问两台服务器: