Skip to main content

Настройка NAT через route-map (nat-destination)

Пример настройки NAT на оборудовании Cisco c использованием route-map, более удобный вариант в сравнении с ip nat inside source list.

interface Loopback0
 ip address y.y.y.y 255.255.255.255
!
interface GigabitEthernet0/0
 ip address x.x.x.2 255.255.255.252
 no ip redirects
 ip nat outside
 ip virtual-reassembly
!
interface GigabitEthernet0/1
 ip address a.a.a.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly
!
ip route 0.0.0.0 0.0.0.0 x.x.x.1
!
ip nat translation tcp-timeout 300
ip nat translation udp-timeout 60
ip nat translation icmp-timeout 30
ip nat translation max-entries 15000
ip nat translation max-entries all-host 250
ip nat inside source route-map rm-nat interface Loopback0 overload
!
ip access-list extended acc-nat
 deny ip any u.u.u.u 0.255.255.255
 permit ip a.a.a.0 0.0.0.255 any
!
route-map rm-nat permit 10
 match ip address acc-nat

Полезные команды:

sh ip nat statistics
sh ip nat translations

clear ip nat translation *
clear ip nat translation forced

cisco, nat