반응형

NAT

공인 IP를 쓰지 않고 호스트들을 Internet에 연결하는 경우에 사용

새로운 ISP에 연결시 기존의 IP Address를 바꾸지 않기 위해서 사용

중복되는 IP주소를 갖는 두 intranet을 연결시에 사용

 

PAT

사설 IP를 가진 호스트들이 공인 IP를 통하여 통신할 수 있게 함

공인 IP주소를 절약

 

Static NAT 설정

(config)# ip nat inside source static |local IP| |Global IP|

inside Local IP 주소를 Inside Global IP로 매핑함

(config-if)# ip nat inside

사설IP와 연결되어있는 인터페이스에 설정

(config-if)# ip nat outside

공인IP와 연결되어있는 인터페이스에 설정

 

Dynamic NAT 설정

(config)# ip nat pool |이름| |시작IP| |종료IP| netmask |마스크|

할당할 Global IP 주소의 Pool을 지정

(config)# access-list |번호| permit source |네트워크IP범위| |WC마스크|

변환할 inside 사설IP주소들의 standard IP ACL을 정의

(config)# ip nat inside source list |ACL 번호| pool |이름|

ACL을 이용하여 Dynamic Source Translation 을 설정

 

예제

 

 

 ip nat pool Test 188.69.232.1 188.69.232.254 netmask 255.255.255.0

 ip nat inside source list 1 pool Test

 

 interface serial 0/0

 ip add 171.69.232.1 255.255.255.0

 ip nat outside

 

 interface fastethernet 0/0

 ip add 192.168.1.1 255.255.255.0

 ip nat inside

 

 access-list 1 permit 192.168.1.0 0.0.0.255

 

PAT 설정

(config)# access-list |번호| permit |Local network| |WC마스크|

변환할 inside local 네트워크들의 standar IP ACL을 정의

(config)# ip nat inside source list |번호| interface |포트| overload

ACL을 이용하여 Dynamic Source Translation을 설정

PAT 설정 예제

 interface fastethernet 0/0

   ip address 192.168.2.1 255.255.255.0

   ip nat inside

 interface serial 0/0

   ip address 172.17.38.1 255.255.255.0

   ip nat outside

 

 ip nat inside source list 1 interface serial 0 overload

 

 ip route 0.0.0.0 0.0.0.0 serial 0

 

 access-list 1 permit 192.168.2.0 0.0.0.255

     ※ 한개의 공인IP에 여러개의 사설IP를 매핑할때 overload 명령어 사용

 

NAT table

# clear ip nat translation *

# clear ip nat translation inside |Global IP| |Local IP| outside |Local IP Global IP|

# clear ip nat translation outside |Local IP| |Global IP|

 

NAT 정보 확인

# show ip nat translations

# show ip nat statistics

'CCNA' 카테고리의 다른 글

스위치 초기 설정  (0) 2013.04.18
Frame-Relay (프레임 릴레이)  (0) 2013.04.12
WAN(Wide Area Network)  (0) 2013.04.11
Access-List  (0) 2013.04.09
OSPF 프로토콜 - B  (0) 2013.04.08
Posted by 마광2
,