Routing and Switching (XII): Network Address Translation

A, NAT Introduction

NAT (Network Address Translation) - network address into the IP address of the forthcoming IP datagram header into another IP address. NAT internal network is mainly used for external network access functions, private addresses can be converted by a public address NAT technology, may be implemented multiple private addresses share one public address to access the external network. NAT typically deployed at the gateway device connected to the network and the external network.
Private IPv4 address:
10.0.0.0/8
172.16.0.0/20
192.168.0.0/16

Two, NAT principle

1, NAT classification

  • Static NAT
    one pair of unique fixed network hosts to map a public IP network can only achieve assigned to the static NAT private address and the public address.
  • Dynamic NAT
    Dynamic NAT address pool to achieve the conversion based on private addresses and public addresses. The gateway device is selected from a public network address pool of unused public network address, and the internal host private IP one to one mapping, when the host does not need the network releases the connection public IP address added to rejoin to the public network address pool; when the public address pool of public IP have all been used, only waiting to be occupied by the public address pool to use the IP address to release public IP address
  • Network Address Port Translation
    Network Address Port Translation allows multiple internal addresses are mapped to different ports of a public address.
  • NAT Server
    allows users to access the external network within the network server by configuring the NAT server

2, NAT configuration

1)静态NAT
nat static global global-address inside inside-address

2) Dynamic Address Translation
NAT-address Group address. 1 Global-Global-Start-End-address
NAT-address outbound ACL-Number Group-PAT NO. 1

3) Network Address Port Translation
nat outbound acl-number

4)NAT Server
nat server protocal tcp global global-address port inside inside-address port

3, NAT ALG

ALG is of specific application layer protocol conversion, such as DNS, FTP protocol to modify the specific data encapsulated in IP packet data portion of the state information by the NAT, and finally to the application layer protocol may be in various ranges.

Guess you like

Origin blog.51cto.com/12631595/2484970
Recommended