当前位置:网站首页>Action principle of NAT
Action principle of NAT
2022-07-21 23:14:00 【Shining wind】
NAT Definition
NAT(Network Address Translator, The Internet address translation ) It is used to use private address in local network , Switch to global when connecting to the Internet IP Address technology .NAT Actually to solve IPv4 There is a shortage of addresses And developed technology .
1.2. NAT Working mechanism
With 192.168.1.2 The host and 1.1.1.2 Take the host of as an example to explain NAT How it works . utilize NAT, On the way NAT The router sends the source address from 192.168.1.2 Convert to global IP Address (12.1.1.1) Send data again . conversely , When response data from 1.1.1.2 When you send it , Destination address (12.1.1.1) First it's converted to private IP Address 192.168.1.2 It will be forwarded later .
In the whole process , The key points are as follows :
Network access can only be initiated by private network side first , The public network cannot actively access the private network host
NAT The router completes two address conversions or translations in two access directions , Replace source information in outgoing direction , Replace the target information in the input direction ;
NAT Network address translation : On the border router -- Connect to the public network ip The interface configuration of the address
On the border router , Right in 、 The outgoing traffic enters the source or target ip Change of address ;
NAT In order to realize the function of two-way translation , Need to maintain an association table , Save the conversation information .
one-on-one One to many Many pairs Port mapping
The experimental requirements
1、R2 by ISP equipment , Can only be configured on this device ip Address , No other configuration is allowed
2/1.1.1.0/24 Network segment represents all network segments of the whole Internet ;
3、Pc1 It's ok pingPC2
4、R1 Only one public ip Address , stay G0/0/1 On the interface
5、CLIENT Can pass http Visit two server
6、client Visiting another server By domain name
1.ip Division and configuration of addresses
Configure the dynamic default route in the border router
2 Route configuration
[r1]rip
[r1-rip-1]version 2
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 12.1.1.0
[r2]rip
[r2-rip-1]v 2
[r2-rip-1]network 1.0.0.0
[r2-rip-1]network 12.0.0.0
[r2-rip-1]quit
[r2]
3Pc1 It's ok pingPC2
5、CLIENT Can pass http Visit two server
[r1]acl 2000
[r1-acl-basic-2000]rule permit source any
[r1-acl-basic-2000]qu
[r1-GigabitEthernet0/0/1]nat outbound 2000
give the result as follows
6、client Visiting another server By domain name
[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]nat static global 12.1.1.3 inside 192.168.1.3
[r1-GigabitEthernet0/0/1]
give the result as follows
边栏推荐
- What is IMS (IP multimedia subsystem)
- The principle, main technology, deployment, advantages and disadvantages of firewall
- C implementation of balanced tree of binary tree
- 四路病房呼叫系统
- HCIP第一节:网络类型学习
- 栈模拟队列
- Excel文件的解析
- Fiddler actual combat - small white level - installation and basic packet capturing and packet changing operations
- How to register IMS for Vos network phone
- OSPF routing control
猜你喜欢
OSPF experiment in mGRE environment
OSI seven layer reference model
Parameters of function
“==“与equals的区别
MGRE comprehensive experiment
Opening animation production of playable Director (timeline) 3D game
What is the difference between outgoing and incoming calls in okcc call center
Day 6 area division and LSA
网络安全的基本介绍
OSPF的优化
随机推荐
对这几年的编程旅路的小总结···
Unity customized gadget "image removal mipmap"
C language address book system
自定义配置文件
HCIP day1
mongoDB复杂查询实例(嵌套多个数组和正则表达式使用)
网络类型 --- 根据数据链路层使用的协议来进行划分的
Function and application of LAN telephone software system
The use of print and the exchange of two numbers
C implementation of extended tree of binary tree
OSPF的不规则区域
Special topic of long connection Gateway Technology (VII): architecture evolution of 1.2 million long connection access layer of Xiaomi Xiaoai single machine
HCIP第十天
D3D function description
四台交换机2台pc实现全网可达
MGRE comprehensive experiment
HCIP第七天
Rip comprehensive experiment
Hcip day 5
栈模拟队列