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 //采用端口復用動態地址轉換