×¢²á | µÇ¼ Íü¼ÇÃÜÂ룿 51ctoÊ×Ò³ | ²©¿Í | ÂÛ̳ | ÕÐÆ¸
ÈȵãÎÄÕÂ Ð£Ô°ÍøÖØ¹æ»®
¡¡°ïÖú

NAT_Static¾²Ì¬NATµÄ¼òµ¥ÅäÖÃ


2008-06-16 19:17:20
¡¡±êÇ©£ºÅäÖà NAT static¡¡¡¡¡¡[ÍÆË͵½¼¼ÊõȦ]

blog.51cto……strive88
 
R1µÄÅäÖãº
Press Enter to Start
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host R1
R1(config)#int e0
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#ip nat inside
R1(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
R1(config-if)#int s0
R1(config-if)#ip add 192.168.2.5 255.255.255.252
R1(config-if)#ip nat outside
R1(config-if)#clock rate 64000
R1(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
R1(config-if)#iend
R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#ip nat inside source static 192.168.1.2 202.101.54.1
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#network 192.168.1.0
R1(config-router)#network 192.168.2.4
R1(config-router)#end
 
 
 
R2µÄÅäÖãº
Press Enter to Start
 
 
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host R2
R2(config)#int e0
R2(config-if)#ip add 202.101.2.1 255.255.255.0
R2(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
R2(config-if)#int s0
R2(config-if)#ip add 192.168.2.6 255.255.255.252
R2(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
R2(config-if)#exit
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#network 192.168.2.4
R2(config-router)#network 202.101.2.0
R2(config-router)#end
R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#line vty 0 4
R2(config-line)#login
R2(config-line)#password cisco
R2(config-line)#end
 
ÔÚR1Éϲ鿴NATת»»£º
R1#sh ip nat statistics
Total active translations: 3 (0 static, 3 dynamic; 3 extended)
Outside interfaces:  Serial0
Inside interfaces:  Ethernet0
Hits: 5  Misses: 5
Expired translations: 5
Dynamic mappings:
-- Inside Source
Access list + 0interface  refcount 0
 
Telnetµ½Â·ÓÉÆ÷R2ÉÏÔٲ鿴:
 
C:>telnet 202.101.2.1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Trying 202.101.2.1 ... Open
 
R2>sh users
 
*  1 vty 1                idle                 202.101.54.1
 
 




    ÎÄÕÂÆÀÂÛ
 
2008-06-17 09:49:47
À´Ñ§Ï° ѧϰ

 

·¢±íÆÀÂÛ

êÇ   ³Æ£º
ÑéÖ¤Â룺 ¡¡µã»÷ͼƬ¿ÉË¢ÐÂÑéÖ¤Âë¡¡¡¡²©¿Í¹ý2¼¶£¬ÎÞÐèÌîдÑéÖ¤Âë
ÄÚ   ÈÝ£º