NAT, Three methods:

1, Static NAT (one-on-one)

2, dynamic NAT (many-to-many)

3, port multiplexer PAT (many-to-one)

1, static configuration

(1) configure the external interface IP address

(2) internal interface IP address configuration

(3) in-house local and global address internal address translation between

router (config) # ip nat inside source static local-ip global-ip

(4), including the opening of the external NAT interface

router (config) # int s0 / 0

router (config-if) # ip nat outside

router (config) # int f0 / 0

router (config-if) # ip nat inside

2, Dynamic NAT configuration

(1) (2) the same with the static configuration

(3) the definition of the internal network to allow access to external network access control list

router (config) # access-list access-list-number permit source source-wildcard

router (config) # access-list 1 permit 192.168.100.0 0.0.0.255

(4) the definition of legitimate IP address pool

router (config) # ip nat pool pool-name start-ip end-ip (netmask netmask | prefix-length prefix-length) [type rotary]

netmask: Subnet Mask said

prefix-length: that the network prefix

type rotary (optional): Address address pool for recycling

router (config) # ip nat pool test 61.159.62.130 61.159.62.132 netmask 255.255.255.192

(5) Network Address Translation

router (config) # ip nat inside source list access-list-number pool pool-name

router (config) # ip nat inside source list 1 pool test

(6), including the opening of the external NAT interface

3, PAT port multiplexer, that is, the number of internal addresses into an external address (through the port to differentiate). The external address can be defined only include an address of the address pool; also can be the use of an external interface ip address.

Method one: Use an external global address

(1) the definition of the internal access list

router (config) # access-list 1 permit 10.1.1.0 0.0.0.255

(2) the definition of a legitimate address pool
router (config) # ip nat pool onlyone 61.159.62.130 61.159.62.130 netmask 255.255.255.248

Because there is only one address, so address pool starting address and ending address of the same

(3) set up the dynamic IP address reuse conversion:

router (config) # ip nat inside source list access-list-number pool pool-name overload

router (config) # ip nat inside source list 1 pool onlyone overload

Method 2: Use a router external interface address

(4) set up the dynamic IP address reuse conversion:

router (config) # ip nat inside source list 1 interface s0 / 0 overload