当前位置:网站首页>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
边栏推荐
- opencv创建窗口—cv.namedWindow()
- SQL Server database schema and objects related knowledge notes
- How to query database configuration parameters in GBase 8c, such as datestyle
- In the background of the GBase 8c database, what command is used to perform the master-slave switchover operation for the gtm and dn nodes
- leetcode 42. Catch the rain
- ClickHouse多种安装方式
- HoloView——实时数据
- 记一次 .NET 某智慧物流WCS系统CPU爆高分析
- SAP ABAP OData 服务如何支持 $orderby (排序)操作试读版
- WLAN networking experiment of AC and thin AP
猜你喜欢
随机推荐
Enterprise WeChat group: robot timing reminder function database configuration
JVM 运行时数据区与JMM 内存模型详解
How does UXDB return the number of records for all tables in the current database?
IntellJ IDEA如何显示换行符(line endings)
编码解码(btoa、encodeURIComponent、encodeURI、escape)
Explain / Desc execution plan analysis
Intensive reading of ACmix papers, and analysis of its model structure
Opencv creates a window - cv.namedWindow()
自定义类型——枚举、联合
如何解决 chrome 浏览器标签过多无法查看到标题的情况
A problem with writing to the database after PHP gets the timestamp
SkiaSharp's WPF self-painted five-ring bouncing ball (case version)
【应用推荐】常见资源管理器整理,含个人使用体验和产品选型推荐
BGP综合实验
HoloView -- Tabular Datasets
【Untitled】
Get the Token from the revised version of Qubutu Bed
[Software Architecture Mode] The difference between MVVM mode and MVC mode
ASP.NET Core 6 Framework Revealing Instance Demonstration [30]: Develop REST API with Routing
Batch大小不一定是2的n次幂!ML资深学者最新结论









