interface fastethernet0/0 ip address 192.168.100.1 255.255.0.0 //定义本地端口IP地址 duplex auto speed auto ip nat inside //定义为本地端口 ! interface fastethernet0/1 ip address 202.99.160.129 255.255.255.252 duplex auto speed auto ip nat outside ! ip nat pool onlyone 202.99.160.130 202.99.160.130 netmask 255.255.255.252 //定义合法IP地址池,名称为onlyone access-list 1 permit 192.168.100.0 0.0.0.255 //定义本地访问列表 access-list 1 permit 192.168.101.0 0.0.0.255 ip nat inside source list1 pool onlyone overload //采用端口复用动态地址转换