Three ways of NAT
-
- What is NAT?
- Classification of IP addresses [Divided by purpose]
- NAT is divided into three categories:
- Implementation process:
-
- 1. First define the external network (public network) interface
- 2. Redefine the intranet enterprise intranet interface
- 3. Convert the internal network pool to the external network pool (mapping relationship)
- 4. Define the internal address pool
- 5. Note: Do the default outward: ip route 0.0.0.0 0.0.0.0 s1/0
- 6. Reverse injection default
- 7. Verify the NAT command
- The difference between dynamic and static routing
- Please see the detailed link
What is NAT?
- Full English name: 【
network address translations
】 - Network address translation: Leading corporate networks
internet
- After converting the internal private network address of the enterprise into a public network address, use the public network address to share the connection
internet
service
Classification of IP addresses [Divided by purpose]
Divided into private network address and public network address
- Private network address: Class A 10.0.0.0----10.255.255.255 Default subnet mask/8=255.0.0.0
Class B 172.16.0.0----172.16.255.255 Default subnet mask/16=255.255.0.0
172.17.0.0----172.17.255.255
172.18.0.0----172.18.255.255
------------------------------ -
172.31.0.0----172.31.255.255
Class B IP address has a total of 16 private network bits
Class C 192.168.0.0-192.168.255.255 has a total of 256 private network bits
Default subnet mask/24=255.255.255.0 - Supplement: Internet: Operators (ISP)-China Unicom, China Mobile, Telecom
NAT is divided into three categories:
Static NAT: one to one
Router(config)# ip nat inside source static 172.18.7.250 1.0.0.250
Source——Static——Intranet server address——Purchase address (public network address)
Dynamic NAT: many to many, many one to one
Port multiplexing NAT (referred to as PAT): (private network) many-to-one (public network)-the most cost-effective
Implementation process:
1. First define the external network (public network) interface
int s1/0
config-if) ip nat outside
#external network
2. Redefine the intranet enterprise intranet interface
int f0/0
config-if)#ip nat inside
3. Convert the internal network pool to the external network pool (mapping relationship)
Router(config) ip nat inside source list1 interface s1/0 overload
#Internal source internal network list external network interface overload
4. Define the internal address pool
r1(config)#access-list 1 permit any
5. Note: Do the default outward: ip route 0.0.0.0 0.0.0.0 s1/0
When more than 2 routers in the intranet use the router protocol OSPF, the default route must be injected into the intranet in the reverse direction
6. Reverse injection default
Router(config)#router ospf 100
Router(config-router)#default-information originate
7. Verify the NAT command
Router# sh ip nat translations
//View the NAT address translation process
The difference between dynamic and static routing
- Static route: manually configure the route to the target network
- Features: When the network topology or link status changes, the network administrator needs to manually modify the relevant static routing information in the routing table
- Dynamic routing: application protocol to complete network intercommunication routing: rip ospf
- Features: It can automatically learn the topology of the network and update the routing table. The disadvantage is that routing broadcast update information will occupy a lot of network bandwidth