当前位置:网站首页>cisco交换机基本配置命令(华为交换机保存命令是什么)
cisco交换机基本配置命令(华为交换机保存命令是什么)
2022-08-01 09:50:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
一、调试命令
思科:
Switch#show run 显示所有配置命令
Switch#show ip inter brief 显示所有接口状态
Switch#show vlan brief 显示所有VLAN的信息
Switch#show version 显示版本信息
华为:
[Quidway]dis cur 显示所有配置命令
[Quidway]display interfaces 显示所有接口状态
[Quidway]display vlan all 显示所有VLAN的信息
[Quidway]display version 显示版本信息
二、接口配置命令
思科:
Switch(config)#interface f0/1 进入接口视图
Switch(config-if)#no shut 此命令开启接口
Switch(config-if)#description to server01 端口描述
Switch(config-if)#ip add 192.168.0.100 255.255.255.0 设置接口IP
华为:
[Quidway]interface e0/1 进入接口视图
[Quidway]undo shutdown 此命令开启接口
[Quidway]description to server02 端口描述
[Quidway]ip add 192.168.0.102 255.255.255.0 设置接口IP
三、VLAN配置命令:
思科:
建立和删除VLAN
Switch# vlan database
Switch(vlan)# vlan 20 name test20
Switch(vlan)# no vlan 20
Switch(vlan)# exit
将端口分配给一个VLAN
Switch(config)# interface f0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 20
设置VLAN TRUNK
Switch(config)# interface f0/24
Switch(config-if)# switchport mode trunk
Switch(config-if)#switchport trunk allow vlan {ID|All}
Switch(config-if)# switchport trunk encapsulation dot1q
华为:
建立和删除VLAN
[Quidway]vlan 30
[Quidway]undo vlan 30
将端口分配给一个VLAN
[Quidway]int ethernet0/1
[Quidway-Ethernet0/1]port access vlan 30( port default vlan 30)
或[Quidway]vlan 30
[Quidway-vlan3]port ethernet 0/1 在VLAN中增加端口
[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 在VLAN中增加多个连续端口
设置VLAN TRUNK
[Quidway]int e0/24
[Quidway-Ethernet0/24] port link-type trunk
[Quidway-Ethernet0/24]port trunk permit vlan {
ID|All}
四、端口镜像配置
思科:
配置镜像源端口
Switch(config)#monitor session 1 source interface gigabitEthernet 0/2 - 5 rx
上面命令最后一个参数:
both 监听双向数据,默认为both
rx 接收
tx 发送
配置镜像目的端口
Switch(config)#monitor session 1 destination interface gigabitEthernet 0/6
删除镜像端口
Switch(config)#no monitor session 1
华为:
将端口E0/2配置为监控端口
[Quidway]monitor-port Ethernet 0/2
端口E0/1配置为镜像端口
[Quidway]port mirror Ethernet 0/1
或者直接配置监控端口和镜像端口
[Quidway]port mirror Ethernet 0/1 observing-port Ethernet 0/2
删除镜像[Quidway]undo monitor-port
五、设置安全远程访问
思科设置vty安全访问:
R1(config)# access-list 1 permit 192.168.0.5
R1(config)# line vty 0 4
R1(config)# access-class 1 in
华为设置vty安全访问:
[Quidway]acl number 2000
rule 1 permit source 172.168.0.150 0
rule 2 deny
[Quidway]user-interface vty 0 4
acl 2000 inbound
六、NTP配置
思科:
Cisco6509#show clock 显示时间
Cisco6509#clock set 14:00:00 30 Sep 2011 设置时间
Cisco6509(config)#ntp server 202.198.0.102 设置与其他时间服务器同步
Cisco6509(config)#clock timezone beijing +8 设置时区
华为:
[Quidway]dis clock 显示时间
[Quidway]clock datetime 23:30:00 2011/11/16 设置时间
[Quidway]ntp-service unicast-server 202.198.0.102 设置与其他时间服务器同步
[Quidway]clock timezone E8 add 08:00:00 设置时区
七、静态路由配置
思科:
ip route <目的网段> <目的网段掩码><下一跳>
Cisco6509# ip route 0.0.0.0 0.0.0.0 10.1.1.2 静态路由
Cisco6509#ip route 0.0.0.0 0.0.0.0 192.168.0.1 150 浮动静态路由管理距离为150
华为:
[Quidway] ip route-static 0.0.0.0 0.0.0.0 10.65.1.2
[Quidway]ip route-static 0.0.0.0 0.0.0.0 192.168.0.1 preference 150
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/126979.html原文链接:https://javaforall.cn
边栏推荐
- notes....
- How to ensure the consistency of database and cache data?
- rpm and yum
- Parsing MySQL Databases: "SQL Optimization" vs. "Index Optimization"
- SQL Server database schema and objects related knowledge notes
- net stop/start mysql80 拒绝访问
- Introduction and application of pointers
- 可视化——Superset安装与部署
- What's up with VS "Cannot find or open PDB file"?How to solve
- CTFshow,命令执行:web33
猜你喜欢
Visualization - Superset installation and deployment
Redis middleware (from building to refuse pit)
自定义类型——枚举、联合
Three chess (C language implementation)
【数据集】各类绝缘子、鸟巢及防震锤数据集汇总
node 格式化时间的传统做法与高级做法(moment)
PowerPC技术与市场杂谈
Meeting OA (Upcoming Meetings & All Meetings)
Explain / Desc execution plan analysis
shell脚本------条件测试 if语句和case分支语句
随机推荐
STM32个人笔记-嵌入式C语言优化
Meeting OA (Upcoming Meetings & All Meetings)
CTO strongly banning the use of the Calendar, that in what?
Lsky Pro 企业版手动升级、优化教程
7. SAP ABAP OData 服务如何支持 $orderby (排序)操作
SkiaSharp 之 WPF 自绘 五环弹动球(案例版)
YOLOv7-Pose尝鲜,基于YOLOv7的关键点模型测评
Google Earth Engine APP——15行代码搞定一个inspector高程监测APP
ASP.NET Core 6 Framework Revealing Instance Demonstration [30]: Develop REST API with Routing
如何在IntellJ IDEA中批量修改文件换行符
50.【Application of dynamic two-dimensional array】
灵魂发问:MySQL是如何解决幻读的?
程序员如何学习开源项目,这篇文章告诉你
sql server, FULL mode, dbcc shrinkfile(2,1) can not shrink the transaction log, or the original size, why?
还在纠结报表工具的选型么?来看看这个
笔记。。。。
如何保证数据库与缓存数据一致性?
Taobao commodity details and details on taobao, senior upgrade version of the API
将Servlet项目改为SSM项目
Custom Types - Enums, Unions