December 2006
Intermediate to advanced
1188 pages
72h 8m
English
You want to dynamically select addresses from a pool.
You can configure the router to automatically select global addresses from a pool as they are required:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#access-list15permitRouter(config)#192.168.0.0 0.0.255.255ip nat poolNATPOOL 172.16.1.100 172.16.1.150netmaskRouter(config)#255.255.255.0ip nat inside source list15poolRouter(config)#NATPOOLinterfaceRouter(config-if)#FastEthernet 0/0ip addressRouter(config-if)#192.168.1.1 255.255.255.0ip nat insideRouter(config-if)#exitRouter(config)#interfaceRouter(config-if)#FastEthernet 0/1ip addressRouter(config-if)#192.168.2.1 255.255.255.0ip nat insideRouter(config-if)#exitRouter(config)#interfaceRouter(config-if)#Ethernet1/0ip addressRouter(config-if)#172.16.1.2 255.255.255.0ip nat outsideRouter(config-if)#exitRouter(config)#endRouter#
This example is similar to Recipe 21.1. The important
functional difference is that the internal devices will appear on the
outside with different global addresses. The first internal device
that makes an outbound connection will get the first address in the
range, 172.16.1.100, the next one
will get the next address, 172.16.1.101, and so forth.
You configure the range with the ip nat pool command:
Router(config)#ip nat poolNATPOOL 172.16.1.100 172.16.1.150netmaskRouter(config)#255.255.255.0ip nat inside source ...
Read now
Unlock full access