首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >网络工程师实用型命令大全

网络工程师实用型命令大全

原创
作者头像
知孤云出岫
发布2025-09-01 13:53:18
发布2025-09-01 13:53:18
3060
举报

网络工程师实用型命令大全

一、设备基本信息查看

命令

平台

作用

示例

show running-config

Cisco

查看当前运行配置

show running-config

display current-configuration

华为/H3C

查看当前配置

display current-configuration

show startup-config

Cisco

查看启动配置

show startup-config

display saved-configuration

华为/H3C

查看保存的配置

display saved-configuration

show version

Cisco

查看设备型号、IOS版本

show version

display version

华为/H3C

查看版本信息

display version

uname -a

Linux

查看操作系统版本

uname -a


二、接口与 IP 配置

操作

Cisco

华为/H3C

进入接口

interface g0/0

interface GigabitEthernet 0/0/0

配置 IP

ip address 192.168.1.1 255.255.255.0

ip address 192.168.1.1 24

启用接口

no shutdown

undo shutdown

查看接口状态

show ip interface brief

display ip interface brief

设置描述

description Uplink to Core

description Uplink-to-Core


三、连通性测试

命令

作用

示例

ping 8.8.8.8

测试连通性

ping 8.8.8.8

ping -a

指定源 IP

ping -a 192.168.1.1 8.8.8.8

tracert 8.8.8.8

Windows 路由跟踪

traceroute 8.8.8.8

Linux / Cisco

telnet 192.168.1.1 22

测试端口连通

ssh user@host

SSH 连接


四、VLAN 与端口

操作

Cisco

华为/H3C

查看 VLAN

show vlan brief

display vlan

创建 VLAN

vlan 10

vlan 10

设置端口 Access 模式

switchport mode access

port link-type access

接口加入 VLAN

switchport access vlan 10

port default vlan 10

查看 Trunk

show interface trunk

display interface trunk


五、三层路由

操作

Cisco

华为/H3C

查看路由

show ip route

display ip routing-table

配置静态路由

ip route 192.168.2.0 255.255.255.0 192.168.1.2

ip route-static 192.168.2.0 24 192.168.1.2

开启路由功能

ip routing

默认开启


六、ACL(访问控制)

操作

Cisco

华为/H3C

创建 ACL

access-list 100 permit ip any any

acl 3000 + rule permit ip any any

应用到接口

ip access-group 100 in

traffic-filter inbound acl 3000


七、日志与调试

命令

作用

show logging

查看日志

debug ip icmp

调试 ICMP 报文

terminal monitor

打开实时调试输出

display logbuffer

查看华为日志缓存


八、设备管理

命令

作用

copy running-config startup-config

保存配置

reload

重启设备

dir flash:

查看存储文件

delete flash:/xxx

删除文件


九、Linux 网络调试必备

命令

作用

ifconfig / ip addr

查看网卡信息

netstat -rn / ip route

查看路由表

tcpdump -i eth0

抓包

curl -I http://example.com

测试 HTTP 服务

ss -tulnp

查看监听端口


场景案例示例

场景 1:检查网络连通性
代码语言:bash
复制
ping 192.168.1.1
traceroute 8.8.8.8
telnet 192.168.1.1 22
场景 2:快速排查接口问题
代码语言:bash
复制
display ip interface brief
display interface GigabitEthernet 0/0/0
场景 3:抓取故障流量
代码语言:bash
复制
tcpdump -i eth0 host 192.168.1.100

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 网络工程师实用型命令大全
    • 一、设备基本信息查看
    • 二、接口与 IP 配置
    • 三、连通性测试
    • 四、VLAN 与端口
    • 五、三层路由
    • 六、ACL(访问控制)
    • 七、日志与调试
    • 八、设备管理
    • 九、Linux 网络调试必备
  • 场景案例示例
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档