当前位置:网站首页>NAT地址转换
NAT地址转换
2022-07-07 16:36:00 【陈叉叉__】
技术背景
- 合法的IP地址资源日益短缺
- 有效隐藏内部主机IP,有一定的网络安全保护作用
NAT 原理:改变IP包头、使目的地址、源地址或两个地址在包头中被不同地址替换
NAT分类:
静态NAT:一对一的地址映射
动态NAT:从地址池中挑选
NAT过载(PAT):允许内部地址映射到一个外部地址
静态NAT
两台路由器分别配置默认路由,全网连通
1.PC0使用公网地址访问外网server ,在R0上配置使内部本地和外部合法地址之间建立静态地址转换
ip nat inside soure static 192.168.10.1 76.12.16.139 #前为内部地址,后为要映射的外部地址
在内部和外部端口上启用NAT
int e0/0/0
ip nat inside
int f0/1
ip nat outside
show ip nat translations
2.将内部server HTTP服务映射成公网IP PC通过公网IP访问内部server
ip nat inside source static tcp 192.168.20.1 80 76.12.16.140 80
int f0/0
ip nat in
show ip nat translations
动态NAT
动态NAT配置步骤
1.配置ACL,用于做地址转换的内网范围
access-list 1 permit 192.168.10.0 0.0.0.255
int f0/0
ip access-group in
2.配置转换的地址池
ip nat pool pool-1 76.12.16.139 76.12.16.141 netmask 255.255.255.248
3.设置ACL和地址池的映射关系
ip nat inside source list 1 pool pool-1
4.在内部和外部端口上启用NAT
int f0/0
ip nat inside
int f0/1
ip nat outside
show ip nat translation #查看使用的NAT地址转换地址
边栏推荐
- Nunjuks template engine
- Tips of the week 136: unordered containers
- Test for 3 months, successful entry "byte", my interview experience summary
- Some key points in the analysis of spot Silver
- Skills of embedded C language program debugging and macro use
- Download, installation and development environment construction of "harmonyos" deveco
- The highest level of anonymity in C language
- Using stored procedures, timers, triggers to solve data analysis problems
- [PaddleSeg源码阅读] PaddleSeg Validation 中添加 Boundary IoU的计算(1)——val.py文件细节提示
- Slider plug-in for swiper left and right switching
猜你喜欢
Test for 3 months, successful entry "byte", my interview experience summary
[deep learning] 3 minutes introduction
Performance test process and plan
讨论 | AR 应用落地前,要做好哪些准备?
SD_DATA_RECEIVE_SHIFT_REGISTER
idea彻底卸载安装及配置笔记
Improve application security through nonce field of play integrity API
ICer知识点杂烩(后附大量题目,持续更新中)
[OKR target management] value analysis
In depth understanding of USB communication protocol
随机推荐
AI 击败了人类,设计了更好的经济机制
PHP面试题 foreach($arr as &$value)与foreach($arr as $value)的用法
PIP related commands
[OKR target management] case analysis
SD_DATA_SEND_SHIFT_REGISTER
Tear the Nacos source code by hand (tear the client source code first)
海量数据去重的hash,bitmap与布隆过滤器Bloom Filter
[deep learning] 3 minutes introduction
Chapter 3 business function development (to remember account and password)
Tips for this week 140: constants: safety idioms
Native JS verification code
强化学习-学习笔记8 | Q-learning
Summary of debian10 system problems
Tips for this week 134: make_ Unique and private constructors
Taffydb open source JS database
Some key points in the analysis of spot Silver
Sanxian Guidong JS game source code
Tips for this week 131: special member functions and ` = Default`
开发一个小程序商城需要多少钱?
More than 10000 units were offline within ten days of listing, and the strength of Auchan Z6 products was highly praised