【网工】华为设备命令学习(nat网络地址转换)

本次实验通过nat技术实现私网转公网。

实验中 pc1和ar2的基本配置省略,只需要配置基本IP地址就行。主要记录AR3的配置代码。

<Huawei>sy

Enter system view, return user view with Ctrl+Z.

Huaweiint g0/0/0

Huawei-GigabitEthernet0/0/0ip address 192.168.1.254 255.255.255.0 //为0号接口配置IP地址

Feb 4 2024 18:53:25-08:00 Huawei %%01IFNET/4/LINK_STATE(l)2:The line protocol

IP on the interface GigabitEthernet0/0/0 has entered the UP state.

Huawei-GigabitEthernet0/0/0int g0/0/1

Huawei-GigabitEthernet0/0/1ip address 64.1.1.1 255.255.255.0 //为1号接口配置IP地址

Feb 4 2024 18:53:51-08:00 Huawei %%01IFNET/4/LINK_STATE(l)3:The line protocol

IP on the interface GigabitEthernet0/0/1 has entered the UP state.

Huawei-GigabitEthernet0/0/1

Huawei-GigabitEthernet0/0/1q

Huaweiacl name neiwang basic //定义一个基本的 名称为neiwang的acl

Huawei-acl-basic-neiwangrule permit source 192.168.0.0 0.0.255.255 //规则为允许来自192.168的IP数据通过该接口

Huawei-acl-basic-neiwangq

Huaweinat ? //通过此方法查看nat命令

address-group IP address-group of NAT

alg Application level gateway

dns-map DNS mapping

filter-mode NAT filter mode

link-down Link down reset session function

mapping-mode NAT mapping mode

overlap-address Overlap address pool to temp address pool map

static Specify static NAT

Huaweinat address-group 1 64.1.1.2 64.1.1.6 //设定一个nat地址池编号为1 允许内网用户使用2到6IP地址

Huaweidis acl all //查看当前配置的所有acl

Total quantity of nonempty ACL number is 1

Basic ACL neiwang 2999, 1 rule

Acl's step is 5

rule 5 permit source 192.168.0.0 0.0.255.255

Huaweiint g0/0/1

Huawei-GigabitEthernet0/0/1nat outbound 2999 address-group 1 //配置nat所有2999acl规则和使用1号地址池

相关推荐
小向是个Der5 小时前
嵌入式进阶——MCU上电后的动作
c语言·单片机·mcu·学习·链接脚本
辣知9 小时前
辣知·化智93 被历史尘封的鬻子
学习
每天题库11 小时前
西藏安全员 A 证备考真题题库 强化重点知识刷题提升通过率
学习·安全·考试·题库·考证
Be for thing11 小时前
PyTorch基础|Tensor张量详解,张量创建、数据类型与常用操作
pytorch·学习·1024程序员节
前进的李工11 小时前
Agent 学习笔记 02:Harness 与工作流怎么理解
笔记·学习·agent·工作流·harness
m4Rk_12 小时前
【论文阅读】Agent记忆机制(114):MemoryTax——当 Agent 能自主搜索历史,专门的记忆系统还划算吗?
论文阅读·人工智能·学习·开源·github
程序员梅雨14 小时前
【从零开始学习数据仓库 | 第一篇】:维度建模理论
大数据·数据仓库·学习·阿里云·数据分析
keyipatience15 小时前
Git学习(4)Git分布式优势与实战配置全解析
git·学习
comyccccc18 小时前
STM32F407VET6核心板的部分电路绘制学习笔记
笔记·stm32·学习
叼烟扛炮18 小时前
Linux 学习笔记(三十六):并发进阶——读写锁 vs 自旋锁,到底怎么选?
linux·运维·服务器·笔记·学习