当前位置: 首页 > news >正文

华为,新华三,思科网络设备指令

1. 设备信息查看

华为

display version         # 查看设备版本信息
display device          # 查看设备硬件信息

新华三(H3C)

display version         # 查看设备版本信息
display device          # 查看设备硬件信息

锐捷

show version            # 查看设备版本信息
show device             # 查看设备硬件信息

思科

show version            # 查看设备版本信息
show inventory          # 查看设备硬件信息

2. 接口状态查看

华为

display interface brief         # 查看接口简要状态
display interface GigabitEthernet 0/0/1  # 查看指定接口的详细信息

新华三(H3C)

display interface brief         # 查看接口简要状态
display interface GigabitEthernet 0/0/1  # 查看指定接口的详细信息

锐捷

show interface brief            # 查看接口简要状态
show interface GigabitEthernet 0/0/1  # 查看指定接口的详细信息

思科

show ip interface brief         # 查看接口简要状态
show interface GigabitEthernet 0/0/1  # 查看指定接口的详细信息

3. 路由表查看

华为

display ip routing-table        # 查看IP路由表

新华三(H3C)

display ip routing-table        # 查看IP路由表

锐捷

show ip route                   # 查看IP路由表

思科

show ip route                   # 查看IP路由表

4. ARP 表查看

华为

display arp                     # 查看ARP表

新华三(H3C)

display arp                     # 查看ARP表

锐捷

show arp                        # 查看ARP表

思科

show arp                        # 查看ARP表

5. MAC 地址表查看

华为

display mac-address             # 查看MAC地址表

新华三(H3C)

display mac-address             # 查看MAC地址表

锐捷

show mac-address-table          # 查看MAC地址表

思科

show mac address-table          # 查看MAC地址表

6. 当前配置查看

华为

display current-configuration   # 查看当前配置

新华三(H3C)

display current-configuration   # 查看当前配置

锐捷

show running-config             # 查看当前配置

思科

show running-config             # 查看当前配置

7. 保存配置

华为

save                           # 保存当前配置

新华三(H3C)

save                           # 保存当前配置

锐捷

write                          # 保存当前配置

思科

write memory                   # 保存当前配置

8. VLAN 配置

华为

system-view
vlan 10                        # 创建VLAN 10
description Sales              # 添加VLAN描述
quit
interface GigabitEthernet 0/0/1
port link-type access          # 设置接口为Access模式
port default vlan 10           # 将接口加入VLAN 10

新华三(H3C)

system-view
vlan 10                        # 创建VLAN 10
description Sales              # 添加VLAN描述
quit
interface GigabitEthernet 0/0/1
port link-type access          # 设置接口为Access模式
port default vlan 10           # 将接口加入VLAN 10

锐捷

configure terminal
vlan 10                        # 创建VLAN 10
name Sales                     # 添加VLAN描述
exit
interface GigabitEthernet 0/0/1
switchport mode access         # 设置接口为Access模式
switchport access vlan 10      # 将接口加入VLAN 10

思科

configure terminal
vlan 10                        # 创建VLAN 10
name Sales                     # 添加VLAN描述
exit
interface GigabitEthernet 0/0/1
switchport mode access         # 设置接口为Access模式
switchport access vlan 10      # 将接口加入VLAN 10

9. ACL 配置

华为

acl number 2000                # 创建ACL 2000
rule 5 permit source 192.168.1.0 0.0.0.255  # 允许192.168.1.0/24网段
rule 10 deny source any        # 拒绝其他所有流量
quit
interface GigabitEthernet 0/0/1
traffic-filter inbound acl 2000  # 在接口入方向应用ACL

新华三(H3C)

acl number 2000                # 创建ACL 2000
rule 5 permit source 192.168.1.0 0.0.0.255  # 允许192.168.1.0/24网段
rule 10 deny source any        # 拒绝其他所有流量
quit
interface GigabitEthernet 0/0/1
packet-filter inbound ip-group 2000  # 在接口入方向应用ACL

锐捷

ip access-list extended 100    # 创建扩展ACL 100
permit ip 192.168.1.0 0.0.0.255 any  # 允许192.168.1.0/24网段
deny ip any any                # 拒绝其他所有流量
exit
interface GigabitEthernet 0/0/1
ip access-group 100 in         # 在接口入方向应用ACL

思科

ip access-list extended 100    # 创建扩展ACL 100
permit ip 192.168.1.0 0.0.0.255 any  # 允许192.168.1.0/24网段
deny ip any any                # 拒绝其他所有流量
exit
interface GigabitEthernet 0/0/1
ip access-group 100 in         # 在接口入方向应用ACL

10. OSPF 配置

华为

ospf 1                         # 启用OSPF进程1
area 0                         # 进入区域0
network 192.168.1.0 0.0.0.255  # 宣告192.168.1.0/24网段

新华三(H3C)

ospf 1                         # 启用OSPF进程1
area 0                         # 进入区域0
network 192.168.1.0 0.0.0.255  # 宣告192.168.1.0/24网段

锐捷

router ospf 1                  # 启用OSPF进程1
network 192.168.1.0 0.0.0.255 area 0  # 宣告192.168.1.0/24网段到区域0

思科

router ospf 1                  # 启用OSPF进程1
network 192.168.1.0 0.0.0.255 area 0  # 宣告192.168.1.0/24网段到区域0

11. STP 配置

华为

stp mode stp                   # 启用STP模式
stp root primary               # 设置当前设备为根桥

新华三(H3C)

stp mode stp                   # 启用STP模式
stp root primary               # 设置当前设备为根桥

锐捷

spanning-tree mode stp         # 启用STP模式
spanning-tree priority 0       # 设置当前设备为根桥

思科

spanning-tree mode rapid-pvst  # 启用Rapid-PVST模式
spanning-tree vlan 1 priority 0  # 设置当前设备为根桥

12. QoS 配置

华为

traffic classifier voice       # 创建流量分类器voice
if-match dscp ef               # 匹配DSCP值为EF的流量
traffic behavior voice         # 创建流量行为voice
priority ef                    # 设置优先级为EF
quit
traffic policy voice_policy    # 创建流量策略voice_policy
classifier voice behavior voice  # 将分类器与行为绑定
quit
interface GigabitEthernet 0/0/1
traffic-policy voice_policy inbound  # 在接口入方向应用策略

新华三(H3C)

traffic classifier voice       # 创建流量分类器voice
if-match dscp ef               # 匹配DSCP值为EF的流量
traffic behavior voice         # 创建流量行为voice
priority ef                    # 设置优先级为EF
quit
traffic policy voice_policy    # 创建流量策略voice_policy
classifier voice behavior voice  # 将分类器与行为绑定
quit
interface GigabitEthernet 0/0/1
qos apply policy voice_policy inbound  # 在接口入方向应用策略

锐捷

class-map match-all voice      # 创建类映射voice
match dscp ef                  # 匹配DSCP值为EF的流量
policy-map voice_policy        # 创建策略映射voice_policy
class voice                    # 应用类映射voice
priority                       # 设置优先级
exit
interface GigabitEthernet 0/0/1
service-policy input voice_policy  # 在接口入方向应用策略

思科

class-map match-all voice      # 创建类映射voice
match dscp ef                  # 匹配DSCP值为EF的流量
policy-map voice_policy        # 创建策略映射voice_policy
class voice                    # 应用类映射voice
priority                       # 设置优先级
exit
interface GigabitEthernet 0/0/1
service-policy input voice_policy  # 在接口入方向应用策略

13. 链路聚合(LACP)

华为/H3C

interface Eth-Trunk 1          # 创建Eth-Trunk 1
mode lacp-static               # 设置为LACP模式
trunkport GigabitEthernet 0/0/1 to 0/0/2  # 将接口加入Eth-Trunk

锐捷

interface Port-channel 1       # 创建Port-channel 1
channel-group 1 mode active    # 将接口加入Port-channel并启用LACP

思科

interface Port-channel 1       # 创建Port-channel 1
channel-group 1 mode active    # 将接口加入Port-channel并启用LACP

14. DHCP 配置

华为/H3C

dhcp enable                    # 启用DHCP服务
interface Vlanif 10
ip address 192.168.1.1 255.255.255.0
dhcp select interface          # 在接口上启用DHCP服务

锐捷

ip dhcp pool VLAN10            # 创建DHCP地址池VLAN10
network 192.168.1.0 255.255.255.0  # 设置地址池范围
default-router 192.168.1.1     # 设置默认网关

思科

ip dhcp pool VLAN10            # 创建DHCP地址池VLAN10
network 192.168.1.0 255.255.255.0  # 设置地址池范围
default-router 192.168.1.1     # 设置默认网关

15. NAT 配置

华为/H3C

acl number 2000                # 创建ACL 2000
rule 5 permit source 192.168.1.0 0.0.0.255  # 允许192.168.1.0/24网段
interface GigabitEthernet 0/0/1
nat outbound 2000              # 在接口出方向应用NAT

锐捷

ip access-list standard NAT    # 创建标准ACL NAT
permit 192.168.1.0 0.0.0.255   # 允许192.168.1.0/24网段
interface GigabitEthernet 0/0/1
ip nat inside                  # 设置接口为NAT内部接口
interface GigabitEthernet 0/0/2
ip nat outside                 # 设置接口为NAT外部接口
ip nat inside source list NAT interface GigabitEthernet 0/0/2 overload  # 启用NAT

思科

ip access-list standard NAT    # 创建标准ACL NAT
permit 192.168.1.0 0.0.0.255   # 允许192.168.1.0/24网段
interface GigabitEthernet 0/0/1
ip nat inside                  # 设置接口为NAT内部接口
interface GigabitEthernet 0/0/2
ip nat outside                 # 设置接口为NAT外部接口
ip nat inside source list NAT interface GigabitEthernet 0/0/2 overload  # 启用NAT

http://www.lryc.cn/news/513408.html

相关文章:

  • WebRTC线程的启动与运行
  • Day3 微服务 微服务保护(请求限流、线程隔离、服务熔断)、Sentinel微服务保护框架、分布式事务(XA模式、AT模式)、Seata分布式事务框架
  • 第9章 子程序与函数调用
  • manacher算法
  • Cocos2dx Lua绑定生成中间文件时参数类型与源码类型不匹配
  • 为什么需要 std::call_once?
  • ubuntu非root用户操作root权限问题-virbox挂在共享文件夹
  • 网络通讯协议
  • centos,789使用mamba快速安装devtools
  • 【人工智能机器学习基础篇】——深入详解强化学习之常用算法Q-Learning与策略梯度,掌握智能体与环境的交互机制
  • 银河麒麟桌面v10sp1修复引导笔记
  • 深入理解 MVCC 与 BufferPool 缓存机制
  • vue实现下拉多选、可搜索、全选功能
  • 探秘Kafka源码:关键内容解析
  • Android音频效果处理:基于`android.media.audiofx`包的原理、架构与实现
  • LeetCode - 初级算法 数组(两个数组的交集 II)
  • SQL 实战:分页查询的多种方式对比与优化
  • 汇川Easy系列正弦信号发生器(ST源代码)
  • JavaSpring AI与阿里云通义大模型的集成使用Java Data Science Library(JDSL)进行数据处理
  • Three.js教程002:Three.js结合Vue进行开发
  • pycharm+anaconda创建项目
  • vue2中遇到的问题与解决方案(自用)
  • CF2043b-B. Digits
  • ultralytics库RT-DETR代码解析
  • (七)- plane/crtc/encoder/connector objects
  • 基于STM32的四轴飞行器的控制系统(论文+源码)
  • 混合精度训练(Mixed Precision Training)中为什么在训练过程中不直接使用bf16进行权重更新?中英双语
  • 【java】HashMap的实现原理
  • FCM32F103C8T6开发指引
  • Python世界:人生苦短,我用Python