공통설정
IOU1
en
conf t
int e0/0
ip add 192.168.10.1 255.255.255.0
no shut
int s2/0
ip add 192.168.100.1 255.255.255.0
no shut
router ospf 1
network 192.168.10.1 0.0.0.0 area 0
network 192.168.100.1 0.0.0.0 area 0
IOU2
en
conf t
int e0/0
ip add 192.168.110.1 255.255.255.0
no shut
int s2/0
ip add 192.168.100.2 255.255.255.0
no shut
int s2/1
ip add 192.168.200.1 255.255.255.0
no shut
router ospf 1
network 192.168.110.1 0.0.0.0 area 0
network 192.168.100.2 0.0.0.0 area 0
network 192.168.200.1 0.0.0.0 area 1
IOU5
en
conf t
int e0/0
ip add 192.168.210.1 255.255.255.0
no shut
int s2/1
ip add 192.168.200.2 255.255.255.0
no shut
router ospf 1
network 192.168.200.2 0.0.0.0 area 1
network 192.168.210.1 0.0.0.0 area 1
모니터링 명령어
IOU1
[no] debug ip nat
IOU5
[no] debug ip nat
nat 아이피 변환 확인 명령어
sh ip nat translation
SNAT
IOU5
int e0/0
ip nat inside
int s2/1
ip nat outside
ip nat inside source static 192.168.210.2 192.168.200.3
ip nat inside source static 192.168.210.3 192.168.200.4
IP 변경
192.168.210.2 > 192.168.200.3
192.168.210.3 > 192.168.200.4
PAT
IOU1
int e0/0
ip nat inside
int s2/0
ip nat outside
access-list 10 permit 192.168.10.0 0.0.0.255
ip nat inside source list 10 int s2/0 overload
IP 변경
192.168.10.2 or 192.168.10.3 > 192.168.100.1:임의포트
DNAT
IOU5
int e0/0
ip nat inside
int s2/0
ip nat outside
ip nat pool DNAT 192.168.200.10 192.168.200.20 netmask 255.255.255.0
access-list 10 permit 192.168.210.0 0.0.0.255
ip nat source list 10 pool DNAT [overload]
IP 변경
192.168.210.2 > 192.168.200.11
192.168.210.3 > 192.168.200.10