Router>en    
Router#conf t     
Enter configuration commands, one per line.  End with CNTL/Z.     
Router(config)#int f 0/0     
Router(config-if)#ip add 192.168.1.254 255.255.255.0     
Router(config-if)#no shutdown 
Router(config-if)#    
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up 
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit    
Router(config)#int f 0/1     
Router(config-if)#ip add 12.12.12.1 255.255.255.252     
Router(config-if)#no shutdown 
Router(config-if)#    
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up 
Router(config-if)#exit    
Router(config)#int f 0/0        
Router(config-if)#ip nat inside         
Router(config-if)#exit     
Router(config)#int f 0/1        
Router(config-if)#ip nat outside         
Router(config-if)#exit     
Router(config)#ip nat inside source static 192.168.1.1 12.12.12.1        
Router(config)#ip route 0.0.0.0 0.0.0.0 fastEthernet 0/1         
Router(config)#exit     
Router#     
%SYS-5-CONFIG_I: Configured from console by console 
Router#write    
Building configuration...     
[OK]     
Router#
Router>en    
Router#conf t     
Enter configuration commands, one per line.  End with CNTL/Z.     
Router(config)#int f 0/1     
Router(config-if)#no shutdown 
Router(config-if)#    
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up 
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#ip add 12.12.12.2 255.255.255.252    
Router(config-if)#exit     
Router(config)#int f 0/0     
Router(config-if)#ip add 13.13.13.254 255.255.255.0     
Router(config-if)#no shutdown 
Router(config-if)#    
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up 
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit    
Router(config)#exit     
Router#     
%SYS-5-CONFIG_I: Configured from console by console     
write     
Building configuration...     
[OK]
本文出自 “Simon.Xu” 博客,请务必保留此出处http://simonxu.blog.51cto.com/8010209/1386428
原文:http://simonxu.blog.51cto.com/8010209/1386428