当前位置:网站首页>Switch and Router Technology-34-Dynamic NAT
Switch and Router Technology-34-Dynamic NAT
2022-08-11 04:56:00 【The little prince w spicy dry tofu】
动态NAT
静态NAT 回顾
静态NAT 1—>1转 192.168.1.1----->64.23.54.99
命令:
Define intranet and extranet interfaces on the interface
Router(config)#int g0/0
Router(config-if)#ip nat inside
Router(config-if)#exit
Router(config)#int g0/1
Router(config-if)#ip nat outside
Router(config-if)#exit
Router(config-if)#in nat inside source static内部ip 公网ip
Check out the conversion table:
Show ip nat translations
To do this experiment, the external network host does not need to configure the gateway,Configuring a gateway is routing rather than static translation

动态NAT
动态的,多对多
第一步,Complete topology construction,划分网段,为PC配置IP地址,注意PC3No gateway is required

第二步:Define the internal network interface and the external network interface on the egress router
Router(config)#int g0/0
Router(config-if)#ip nat inside
Router(config-if)#exit
Router(config)#int g0/1
Router(config-if)#ip nat outside
Router(config-if)#exit
Router(config)#
第三步:
1.Define the scope of the intranet 使用ACL来定义允许
Router(config)#access-list 10 permit 192.168.10.0 0.0.0.255
2. Define the scope of the extranet,使用名称指定范围IP
Router(config)#ip nat pool dtnat 23.34.56.70 23.34.56.71 netmask 255.255.255.0
3.应用
Router(config)#ip nat inside source list 10 pool dtnat
The three internal addresses correspond to the two public network addresses,Only two devices can use the external network at most at the same time

Check out the conversion table

clear conversion table
Router#Clear ip nat translations *

The configuration of the egress router
Router(config)#
Router(config)#int g0/0
Router(config-if)#ip nat inside
Router(config-if)#exit
Router(config)#int g0/1
Router(config-if)#ip nat outside
Router(config-if)#exit
Router(config)#ip nat inside ?
source Source address translation
Router(config)#ip nat inside source ?
list Specify access list describing local addresses
static Specify static local->global mapping
Router(config)#ip nat inside source list ?
<1-199> Access list number for local addresses
WORD Access list name for local addresses
第一步:
创建ACL 允许192.168.10.0 网段通过,注意ACL使用的是反掩码
Router(config)#access-list 10 permit ?
A.B.C.D Address to match
any Any source host
host A single host address
Router(config)#access-list 10 permit 192.168.10.0 ?
A.B.C.D Wildcard bits
<cr>
Router(config)#access-list 10 permit 192.168.10.0 0.0.0.255
第二步:
创建PoolDefine the public network address range,Note that the subnet mask should be added to determine the size of the network range
Router(config)#ip nat ?
inside Inside address translation
outside Outside address translation
pool Define pool of addresses
Router(config)#ip nat pool nat ?
A.B.C.D Start IP address
Router(config)#ip nat pool nat 23.34.56.70 ?
A.B.C.D End IP address
Router(config)#ip nat pool nat 23.34.56.70 23.34.56.71
% Incomplete command.
Router(config)#ip nat pool nat 23.34.56.70 23.34.56.71 ?
netmask Specify the network mask
Router(config)#ip nat pool nat 23.34.56.70 23.34.56.71 netmask 255.255.255.0
应用:
Router(config)#ip nat inside source ?
list Specify access list describing local addresses
static Specify static local->global mapping
Router(config)#ip nat inside source list 10 ?
interface Specify interface for global address
pool Name pool of global addresses
Router(config)#ip nat inside source list 10 pool nat
边栏推荐
猜你喜欢

Switch and Router Technology-29-OSPF Virtual Link

The use of async (asynchronous) and await

How to add icons to web pages?

Selenium自动化测试框架工作原理你明白了吗?

网络协议1

对象的创建以及显示转换

破解事务性工作瓶颈,君子签电子合同释放HR“源动力”!
![[E-commerce operation] How to formulate a social media marketing strategy?](/img/fe/fc1270e608abbce02f83fcb712e562.jpg)
[E-commerce operation] How to formulate a social media marketing strategy?

如何给网页添加icon图标?

Overview of the JVM garbage collection and mechanism
随机推荐
Network Skill Tree
项目实战第二十七讲:状态模式在重名品牌中的应用
交换机和路由器技术-31-扩展ACL
关于pom.xml文件
Kong实现禁止国外IP访问
Object Creation and Display Transformation
对象的创建以及显示转换
Harvesting of radio frequency energy
ERROR: Could not install packages due to an OSError: [Errno 2] 没有那个文件或目录: ‘/data/xxxx
【ImageNet】数据集1000个类的名称
Self-research capability was recognized again, and Tencent Cloud Database was included in the Forrester Translytical report
I wrote some code in my resume, but I still can't pass the interview
findViewById返回null的问题
Smart Pointer Notes
The use of async (asynchronous) and await
IP-Guard如何禁止运行U盘程序
Jetson Orin platform 4-16 channel GMSL2/GSML1 camera acquisition kit recommended
Events and scheduled tasks in Mysql
绿盾加密如何顺利切换成IP-Guard加密
FPGA工程师面试试题集锦121~130