
ip nat inside source static 로컬IP 글로벌IPip nat inside source static 10.1.1.2 192.168.1.2ip nat insideip nat outside
configure terminal
interface fa0/0
ip address 192.168.1.254 255.255.255.0
no shutdown
exit
exit
show ip interface briefR1 라우터 설정
configure terminal
interface fa0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
interface fa0/1
ip address 10.1.1.1 255.255.255.0
no shutdown
exit
exit
show ip interface brief

두 라우터의 연결 확인
ping 192.168.1.254

VPCS 설정
ip 10.1.1.2 /24 10.1.1.1
ping 192.168.1.1

ping 192.168.1.254

R1에서 정적 NAT 설정
configure terminal
ip nat inside source static 10.1.1.2 192.168.1.2
interface fa0/0
ip nat outside
interface fa0/1
ip nat inside

VPCS에서 R2 라우터에 다시 ping
ping 192.168.1.254
ip nat pool 이름 시작IP 종료IPaccess-list 번호 permit 네트워크대역 와일드마스크ip nat inside source list ACL번호 pool 이름R1에서 기존 설정 제거
configure terminal
no ip nat inside source static 10.1.1.2 192.168.1.2
interface fa0/0
no ip nat outside
interface fa0/1
no ip nat inside
R1에서 설정
외부에서 사용할 주소 풀을 생성
configure terminal
ip nat pool net-200 192.168.1.32 192.168.1.63 netmask 255.255.255.224
대역
192.168.1.32 ~ 192.168.1.63
마지막 8자리 : .00100000 ~ .00111111
따라서 서브넷 마스크의 마지막 8자리 : .11100000
-> 128 + 54 + 32 = 224
내부에서 사용할 주소 풀을 생성
access-list 1 permit 10.1.1.0 0.0.0.255
주소 pool을 만들지 않고 바로 적용
ip nat inside source list 3 interface fa0/0 overload
인터페이스 설정
interface fa0/0
ip nat outside
interface fa0/1
ip nat inside

VPCS에서 R2 라우터에 다시 ping
ping 192.168.1.254
R1에서 설정
외부에서 사용할 주소 풀을 생성
configure terminal
ip nat pool net-100 192.168.1.64 192.168.1.95 netmask 255.255.255.224
내부에서 사용할 주소 풀을 생성
access-list 2 permit 10.1.1.0 0.0.0.255
연결
ip nat inside source list 2 pool net-100 overload
인터페이스 설정
interface fa0/0
ip nat outside
interface fa0/1
ip nat inside
VPC에서 다시 ping을 수행
ping 192.168.1.254
R1에서 주소 변환 확인
show ip nat translations

access-list 번호 {permit | deny} 네트워크주소 와일드카드마스크access-list 3 permit 10.1.1.0 0.0.0.255ip nat inside source list ACL번호 interface 인터페이스이름 overloadip nat inside source list 3 interface fa0/0 overloadinterface fa0/0
ip nat outside
interface fa0/1
ip nat insideping 192.168.1.254show ip nat translations