当前位置:网站首页>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
边栏推荐
- In the closing pages/uninstall (unload) sends a request to the server before the document
- 交换机和路由器技术-33-静态NAT
- 交换机和路由器技术-31-扩展ACL
- The basics of binary heap~
- Switch and Router Technology - 28 - NSSA Areas for OSPF
- Smart Pointer Notes
- 对象的创建以及显示转换
- 【FPGA教程案例49】控制案例1——基于FPGA的PID控制器verilog实现
- 交换机和路由器技术-21-RIP路由协议
- [Web3 series development tutorial - create your first NFT (9)] How to view your NFT in the mobile wallet
猜你喜欢
随机推荐
交换机和路由器技术-25-OSPF多区域配置
关于pom.xml文件
Zabbix builds enterprise-level monitoring and alarm platform
FPGA工程师面试试题集锦121~130
Overview of the JVM garbage collection and mechanism
I wrote some code in my resume, but I still can't pass the interview
Merkel Studio--OpenEuler Training Notes (1)
Layered Architecture & SOA Architecture
Summary of c language fprintf, fscanf, sscanf and sprintf function knowledge points
02.折叠隐藏文字
C语句:数据存储
力扣——青蛙跳台阶问题
Switch and Router Technology - 28 - NSSA Areas for OSPF
Events and scheduled tasks in Mysql
Solve the problem of multi-thread calling sql stored procedure
【Web3 系列开发教程——创建你的第一个 NFT(9)】如何在手机钱包里查看你的 NFT
网络安全培训机构哪家好?排名怎么选择?
jwsManager服务接口实现类-jni实现
[E-commerce operation] How to formulate a social media marketing strategy?
zabbix构建企业级监控告警平台








