en config t ip nat pool c2610 211.90.139.41 211.90.139.42 netmask 255.255.255.252 (定義一個地址池c2601,其內包含了兩個空閑的合法IP地址,供NAT轉換時使用) int e0/0 ip address 192.168.1.1 255.255.255.0 ip nat inside exit (設置以太口的IP地址,并設置其為連接內部網的端口) interface s0/0 ip address 211.90.137.25 255.255.255.252 ip nat outside exit (設置廣域網端口的IP地址,并設置其為連接外部網的端口) ip route 0.0.0.0 0.0.0.0 211.90.137.26 (設置動態路由) access-list 2 permit 192.168.0.1 0.0.0.255 (建立訪問控制列表) ! Dynamic NAT ! ip nat inside source list 2 pool c2610 overload (建立動態地址翻譯) line console 0 exec-timeout 0 0 ! line vty 0 4 end