In this case, because a route map was used by NAT to match the traffic to be translated, NAT will create a fully extended translation entry, which includes both inside and outside translation information:
inside outside local global global local 10.1.1.2:1024 131.108.2.1:1024 131.108.1.2:23 131.108.1.2:23
Return packet: Host 2 to Host 1:
Packet on (Network 2) s:131.108.1.2(23) d:131.108.2.1(1024) Packet on (Network 1) s:131.108.1.2(23) d:10.1.1.2(1024) (after NAT)
Host 1 to Host 3
Now when Host 1 sends a packet to Host 3 we get the following:
Packet on (Network 1) s:10.1.1.2(1025) d:131.118.1.2(23) Packet on (Network 2) s:131.118.2.1(1025) d:131.118.1.2(23) (after NAT)
The translation worked correctly because the packet on (N1) doesn't match the fully extended translation entry that was used for the Host 1 to Host 2 traffic. Because the existing translation doesn't match, NAT creates another translation entry for the Host 1 to Host 3 traffic.
Below are the fully extended translation entries on the NAT router:
inside outside local global global local 10.1.1.2:1024 131.108.2.1:1024 131.108.1.2:23 131.108.1.2:23 10.1.1.2:1025 131.118.2.1:1025 131.118.1.2:23 131.118.1.2:23
Because the NAT translation table has two full entries, it will correctly translate traffic going to the two different destinations from the same source.
Unlike the simple translation entry that was created via the access list, the fully extended translation entry created via the route map cannot be used by any other outside user to send a packet to Host 1. A static NAT translation would be needed to allow this.
Note 1
In the case of access-list with overload, the configuration is similar to the access-list without overload case. The exception is that you need to add the keyword overload to the command ip nat inside source list 108 pool pool108 and ip nat inside source list 118 pool pool118.
Note 2
The advantage of using route-maps is that under the match command you can have more options other than source IP address. For example, under the route-map, match interface or match ip next-hop can be specified. By using route-maps, you can specify the IP address as well as the interface or the next-hop address to which the packet is to be forwarded. Therefore, route-maps with NAT are used in a scenario where the subscriber is multi-homing to different ISPs.
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




