动态配置示例<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Router#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ho R2
R2(config)#no ip domain-lo
R2(config)#line c 0
R2(config-line)#logg syn
R2(config-line)#exec-t 0 0
R2(config-line)#exit
Router(config)#int ser0
Router(config-if)#ip add 100.1.1.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#ip nat outside
Router(config-if)#exi
Router(config)#int e0
Router(config-if)#ip add 192.168.2.1 255.255.255.0
Router(config-if)#ip nat inside
Router(config-if)#no shut
Router(config-if)#exit
Router(config)#ip nat inside source list 2 pool ds2 overload
(跟前面一样,这里设置复用动态转换,跟动态一个区别就是这里多增加了一个OVERLOAD)
Router(config)#access-list 2 permit 192.168.2.1 <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />0.0.0.0
Router(config)#access-list 2 permit 192.168.2.2 0.0.0.0
Router(config)#ip nat pool ds2 100.1.1.1 100.1.1.2 net 255.255.255.0
Router(config)#exi
Router#sh run
|
转载于:https://blog.51cto.com/xxgbblog/48453