路由器2501的配置: Current configuration: version 11.3 no service password-encryption hostname 2501 ip nat inside source static 10.1.1.2 192.1.1.2 ip nat inside source static 10.1.1.3 192.1.1.3 ip nat inside source static 10.1.1.4 192.1.1.4 interface Ethernet0 ip address 10.1.1.1 255.255.255.0 ip nat inside interface Serial0 ip address 192.1.1.1 255.255.255.0 ip nat outside no ip mroute-cache bandwidth 2000 no fair-queue clockrate 2000000 interface Serial1 no ip address shutdown no ip classless ip route 0.0.0.0 0.0.0.0 Serial0 line con 0 line aux 0 line vty 0 4 password cisco end
配置完成后可以用以下语句进行查看: show ip nat statistcs show ip nat translations
Current configuration: version 11.3 no service password-encryption hostname 2501 ip nat pool aaa 192.1.1.2 192.1.1.10 netmask 255.255.255.0 ip nat inside source list 1 pool aaa interface Ethernet0 ip address 10.1.1.1 255.255.255.0 ip nat inside interface Serial0 ip address 192.1.1.1 255.255.255.0 ip nat outside no ip mroute-cache bandwidth 2000 no fair-queue clockrate 2000000 interface Serial1 no ip address shutdown no ip classless ip route 0.0.0.0 0.0.0.0 Serial0 access-list 1 permit 10.1.1.0 0.0.0.255 line con 0 line aux 0 line vty 0 4 password cisco end