当前位置:网站首页>NAT实验演示(Huawei交换机设备配置)
NAT实验演示(Huawei交换机设备配置)
2022-07-28 18:40:00 【51CTO】
一、NAT介绍
NAT(Network Address Translation)网络地址转换,可以将IP数据报文头中的IP地址转换为另一个IP地址,并通过转换端口号达到地址重用的目的,NAT由于实现简单,有效地缓解了IPv4公有地址短缺的问题,目前应用广泛。
二、实验目的
通过NAT,实现PC1和PC2可以访问到互联网上的Server1;
三、实验拓扑

四、实验配置
(1)PC1,PC2配置上IP地址,子网掩码和网关。


(2)R1配置
<Huawei>system-view
#进入视图模式
[Huawei]sysname R1
#修改路由器名称
[R1]un in en
#关闭日志提示
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.254 24
[R1-GigabitEthernet0/0/0]q
[R1]interface g0/0/1
[R1-GigabitEthernet0/0/1]ip add 12.1.1.1 24
[R1-GigabitEthernet0/0/1]q
[R1]nat address-group 1 12.1.1.3 12.1.1.5
#创建一个地址池
[R1]acl 2000
#创建标准ACL
[R1-acl-basic-2000]rule 10 permit source 192.168.1.0 0.0.0.255
#允许内网地址段
[R1-acl-basic-2000]q
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]nat outbound 2000 address-group 1
#外网口调用ACL和地址池
[R1-GigabitEthernet0/0/1]q
[R1]ip route-static 0.0.0.0 0 12.1.1.2
#R1上配置缺省路由 下一条为ISP的G0/0/0口
(3)ISP配置
<Huawei>system-view
[Huawei]sysname ISP
[ISP]un in en
[ISP]int g0/0/0
[ISP-GigabitEthernet0/0/0]ip add 12.1.1.2 24
[ISP-GigabitEthernet0/0/1]int g0/0/1
[ISP-GigabitEthernet0/0/1]ip add 23.1.1.1 24
[ISP-GigabitEthernet0/0/1]q
[ISP]ospf 1
[ISP-ospf-1]area 0
[ISP-ospf-1-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[ISP-ospf-1-area-0.0.0.0]network 23.1.1.0 0.0.0.255
(4)Server1配置
<Huawei>system-view
[Huawei]sys Server1
[Server1]interface g0/0/0
[Server1-GigabitEthernet0/0/0]ip add 23.1.1.2 24
[Server1-GigabitEthernet0/0/0]q
[Server1]un in en
[Server1]ospf 1
[Server1-ospf-1]area 0
[Server1-ospf-1-area-0.0.0.0]network 23.1.1.0 0.0.0.255
(5)用PC1和PC2 ping Server1 测试是否连通


PC1和PC2 ping Server1可以ping通,配置成功。
边栏推荐
- C# 读取 CSV文件内数据,导入DataTable后显示
- 上海交大牵手淘宝成立媒体计算实验室:推动视频超分等关键技术发展
- [dynamic link library (DLL) initialization example program failed "problem]
- 一文了解 Rainbond 云原生应用管理平台
- Anaconda creation environment
- Use of DDR3 (axi4) in Xilinx vivado (1) create an IP core
- 读取json配置文件,实现数据驱动测试
- LeetCode_ Bit operation_ Medium_ 260. Number III that appears only once
- [POC - proof of concept]
- Unity performance optimization
猜你喜欢

读取json配置文件,实现数据驱动测试

The engineering practice of super large model was polished, and Baidu AI Cloud released the cloud native AI 2.0 solution

Unity performance optimization

Unity package project to vs deploy hololens process summary

Torch. NN. Linear() function

Raspberrypico analytic PWM

Tree row expression

Solutions to the environment created by Anaconda that cannot be displayed in pycharm

Install keras, tensorflow, and add the virtual environment to the Jupiter notebook

DOS common commands
随机推荐
超大模型工程化实践打磨,百度智能云发布云原生AI 2.0方案
Solutions to the environment created by Anaconda that cannot be displayed in pycharm
[fasttext -- Summary notes]
Tree row expression
LeetCode_ Bit operation_ Medium_ 260. Number III that appears only once
Linxu [permission, sticky bit]
Install keras, tensorflow, and add the virtual environment to the Jupiter notebook
一文让你搞懂什么是TypeScript
Voice controlled robot based on ROS (II): implementation of upper computer
Classes and objects (medium)
微信公众号授权登录后报redirect_uri参数错误的问题
太空射击第09课:精灵动画
太空射击第16课: 道具(Part 2)
Linxu 【基本指令】
Mongoose condition queries part of the data of the specified attribute
Does any elder brother know how to solve the huge flinksql log
Raspberrypico serial communication
Raspberry pie 4B deploy yolov5 Lite using ncnn
[task03: complex query methods - views, subqueries, functions, etc.]
Commands related to obtaining administrator permissions