方法二:动态NAT
|
KC-R1(config)# ip nat pool kachy 173.16.1.58 173.16.1.126 netmask 255.255.255.0 #创建地址池 KC-R1(config)#access-list 1 permit 10.1.1.0 0.0.0.255 #创建ACL KC-R1(config)#ip nat inside source list 1 pool kachy #二者关联 KC-R1(config)#exit Ping测试 PC-1#ping 202.101.1.149 #测试证明能通 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 202.101.1.149, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 96/125/148 ms PC-1#telnet 202.101.1.149 #测试证明能远程连接 Trying 202.101.1.149 … Open Password required, but none set [Connection to 202.101.1.149 closed by foreign host] 此时PC-2也可以ping通,telnet上。 查看当前KC-R1的NAT表。 KC-R1#sh ip nat translations #查看NAT表 Pro Inside global Inside local Outside local Outside global — 173.16.1.58 10.1.1.1 — — — 173.16.1.59 10.1.1.2 — — KC-R1# |

