交换机的基本配置命令(华为交换机查看配置的命令是什么)
以分钟为单位 c***ole(config-ssh)#password xxxx //不少于八位的密码用来访问ssh c***ole(config-ssh)#no password //删除password密码 c***ole(config-ssh)#exit //退出ssh口配置视图 2:cisco2960 VLan设置 c***ole》 enable //进入特权模式 c***ole#configure //进入配置视图 c***ole(config)#vlan database //进入vlan设置 c***ole(config-vlan)#vlan 2 //创建vlan 2 c***ole(config-vlan)#no vlan 2 v //删除vlan 2 c***ole(config-vlan)#exit //回到特权模式下 c***ole(config)#inte***ce vlan 2 //进入vlan2配置视图 c***ole(config-if-vlan2)#name xxx //为vlan取名字 端口设置命令: c***ole(config)#inte***ce ethernet 1/g1 //进入网口1,把一台交换机配置成VTP Server, 其余交换机配置成VTP Client,这样他们可以自动学习到server 上的VLAN 信息 4:交换机配置IP地址 c***ole(config)#inte***ce vlan 1 //进入vlan 1 c***ole(config-if-vlan1)#ip address 119.167.223.221 255.255.255.128 //设置交换机的管理ip地址 c***ole(config)#ip default-gateway 119.167.223.254 //设置交换机的默认网关 c***ole(config)#end //退出当前模式 5: 交换机保存设置命令 c***ole#copy running-config startup-config //将当前正在使用中的配置保存到交换机开机需要加载的配置文件里去,全部允许 c***ole(config-if-1/xg1)#switchport access vlan 2 //将当前端口以access模式加入到vlan 2中 将端口加入vlan c***ole(config)#inte***ce ethernet 1/g1 c***ole(config-if-1/g1)#switchport mode access c***ole(config-if-1/g1)#switchport access vlan 2 将多个端口加入到VLAN中 c***ole(config)#inte***ce range ethernet 1/g1-1/g12 //进入1-12这个接口组里配置 c***ole(config-if)#switchport mode access c***ole(config-if)#switchport access vlan 2 c***ole#show vlan //用于查看配置后结果 3:设置VTP cisco专有的vlan终极协议也成为局域网干道协议,总共有三种类型 c***ole(config-if-1/g1)#switchport access vlan 2 //将端口以access模式加入到vlan 2中 c***ole(config-if-1/g1)#shutdown //关闭当前端口 c***ole(config-if-1/g1)#no shutdown //打开当前端口 c***ole(config)#inte***ce ethernet 1/g24 //进入汇聚千兆口24,可以用来决定此口是否为二层或三层口 c***ole#show ip inte***ce vlan100 //查看交换机vlan100的ip配置信息 c***ole#show version //查看交换机固件版本信息 7:基于端口的mac地址绑定 c***ole#config //进入配置视图模式 c***ole(config)#inte***ce ethernet 1/g1 //进入具体端口视图模式下 c***ole(config-if-1/g1)#switchport port-secruity //配置端口安全模式 c***ole(config-if-1/g1)#switchport port-secruity mac-address MAC(主机的mac地址) //配置该端口要绑定的主机的MAC地址 c***ole(config-if)#no switchport port-secruity mac-address MAC(主机的mac地址) //删除绑定主机的mac地址 8:配置交换机的snmp功能 c***ole(config)#snmp-server community xxx ro //xxx为自定义的共同体名称,这里可以设置通过超级终端访问交换机的一些参数 c***ole(config-line)#enable authentication default //配置访问角色为默认 c***ole(config-line)#exec-timeout 《0-65535》 minutes // 设置c***ole口自动关闭时间,共有4个千兆combo口21-24 c***ole(config-if-1/g24)# c***ole(config-if-1/g24)#duplex auto/full/half //设置端口工作模式为 自适应/全双通/半双通 c***ole(config-if-1/g24)#switchport mode trunk //设置当前端口模式为汇聚口 c***ole(config-if-1/g24)#switchport mode access //设置当前端口模式为接入模式 c***ole(config-if-1/g24)#switchport trunk allowed vlan add/remove 1,2 //将当前汇聚端口加入或移除从vlan1,共有4个千兆combo口21-24对应四个1/xg1-1/xg4万兆光口 c***ole(config-if-1/xg1)# c***ole(config-if-1/xg1)#duplex auto/full/half //设置端口工作模式为 自适应/全双通/半双通 c***ole(config-if-1/xg1)#switchport mode trunk //设置当前端口模式为汇聚口 c***ole(config-if-1/xg1)#switchport mode access //设置当前端口模式为接入模式 c***ole(config-if-1/xg1)#switchport trunk allowed vlan add/remove 1,2 //将当前汇聚端口加入或移除从vlan1。
本文目录
华为交换机查看配置的命令是什么
华为交换机常用命令:
1、display current-configuration 显示当前配置
2、display inte***ce GigabitEthernet 1/1/4 显示接口信息
3、display packet-filter inte***ce GigabitEthernet 1/1/4 显示接口acl应用信息
4、display acl all 显示所有acl设置 3900系列交换机
5、display acl config all 显示所有acl设置 6500系列交换机
6、display arp 10.78.4.1 显示该ip地址的mac地址,所接交换机的端口位置
7、display cpu显示cpu信息
8、system-view 进入系统图(配置交换机),等于config t 命令
9、acl number 5000 在system-view命令后使用,进入acl配置状态
10、rule 0 deny 0806 ffff 24 0a4e0401 f 40 在上面的命令后使用,acl 配置例子
11、rule 1 permit 0806 ffff 24 000fe218ded7 f 34 //在上面的命令后使用,acl配置例子
12、inte***ce GigabitEthernet 1/0/9 //在system-view命令后使用,进入接口配置状态
13、qos //在上面的命令后使用,进入接口qos配置
14、packet-filter inbound user-group 5000 //在上面的命令后使用,在接口上应用进站的acl
15、packet-filter outbound user-group 5001 //在接口上应用出站的acl
16、undo acl number 5000 //取消acl number 5000 的设置
17、ip route-static 0.0.0.0 0.0.0.0 10.78.1.1 preference 60 //设置路由
18、reset counters inte***ce Ethernet 1/0/14 //重置接口信息
19、save //保存设置
20、quit //退出
戴尔交换机配置命令大全
交换机除了能够连接同种类型的网络之外,还可以在不同类型的网络(如以太网和快速以太网)之间起到互连作用。这篇文章主要介绍了DELL6224交换机基本配置命令一览,需要的朋友可以参考下
具体介绍
1:配置登录用户,口令等
c***ole》 //用户直行模式提示符
c***ole》enable //进入特权模式
c***ole# //特权模式(配置密码后必须输入密码才可进入特 权模式)
c***ole#config //进入全局配置模式 configure
c***ole(config)# //配置模式提示符
c***ole(config)#exit //还有一个命令是end也和exit差不多
c***ole#quit
c***ole》
c***ole(config)#hostname xxx //设置主机名成为xxx这里使用c***ole
c***ole(config)#enable password xxx //设置使能口令为明文显示为xxx,必须不少于8字符远程telnet的时候起作用本地通过c***ole口不需要密码的
c***ole(config)#username zy password 12345678 level 15 //定义交换机的用户名以及对应的权限。
c***ole(config)#line c***ole //进入c***ole口配置视图,这里可以设置通过超级终端访问交换机的一些参数
c***ole(config-line)#enable authentication default //配置访问角色为默认
c***ole(config-line)#exec-timeout 《0-65535》 minutes // 设置c***ole口自动关闭时间,以分钟为单位
c***ole(config-line)#speed 9660 //设置访问速率,一般9660为默认设置。
c***ole(config-line)#password xxxx //不少于八位的密码用来访问c***ole,与enable password xxx,差不多
c***ole(config-line)#no password //删除password密码
c***ole(config-line)#exit //退出c***ole口配置视图
c***ole(config)#line telnet //进入telnet配置视图
c***ole(config-telnet)#enable authentication default //配置访问角色为默认
c***ole(config-telnet)#exec-timeout 《0-65535》 minutes // 设置telnet访问闲置自动关闭时间,以分钟为单位
c***ole(config-telnet)#password xxxx //不少于八位的密码用来访问telnet
c***ole(config-telnet)#no password //删除password密码
c***ole(config-telnet)#exit //退出telnet口配置视图
c***ole(config)#line ssh //进入ssh配置视图
c***ole(config-ssh)#enable authentication default //配置访问角色为默认
c***ole(config-ssh)#exec-timeout 《0-65535》 minutes // 设置ssh访问闲置自动关闭时间,以分钟为单位
c***ole(config-ssh)#password xxxx //不少于八位的密码用来访问ssh
c***ole(config-ssh)#no password //删除password密码
c***ole(config-ssh)#exit //退出ssh口配置视图
2:cisco2960 VLan设置
c***ole》 enable //进入特权模式
c***ole#configure //进入配置视图
c***ole(config)#vlan database //进入vlan设置
c***ole(config-vlan)#vlan 2 //创建vlan 2
c***ole(config-vlan)#no vlan 2 v //删除vlan 2
c***ole(config-vlan)#exit //回到特权模式下
c***ole(config)#inte***ce vlan 2 //进入vlan2配置视图
c***ole(config-if-vlan2)#name xxx //为vlan取名字
端口设置命令:
c***ole(config)#inte***ce ethernet 1/g1 //进入网口1, / 1/g1指的是第一个插槽上的第一个千兆网口
c***ole(config-if-1/g1)# //接口视图模式
c***ole(config-if-1/g1)#speed 10/100/1000 //定义端口的带宽,只能从这三种模式中做选择。
c***ole(config-if-1/g1)#duplex full/half //定义双工模式
c***ole(config-if-1/g1)#negotiation //启用自动协商速度和双工参数
c***ole(config-if-1/g1)#no negotiation //禁用自动协商速度和双工参数
c***ole(config-if-1/g1)#switchport mode access/trunk/general //定义端口类型,总共有三种类型
c***ole(config-if-1/g1)#switchport access vlan 2 //将端口以access模式加入到vlan 2中
c***ole(config-if-1/g1)#shutdown //关闭当前端口
c***ole(config-if-1/g1)#no shutdown //打开当前端口
c***ole(config)#inte***ce ethernet 1/g24 //进入汇聚千兆口24,共有4个千兆combo口21-24
c***ole(config-if-1/g24)#
c***ole(config-if-1/g24)#duplex auto/full/half //设置端口工作模式为 自适应/全双通/半双通
c***ole(config-if-1/g24)#switchport mode trunk //设置当前端口模式为汇聚口
c***ole(config-if-1/g24)#switchport mode access //设置当前端口模式为接入模式
c***ole(config-if-1/g24)#switchport trunk allowed vlan add/remove 1,2 //将当前汇聚端口加入或移除从vlan1,2通过,vlan修剪,默认为all,全部允许
c***ole(config-if-1/g24)#switchport access vlan 2 //将当前端口以access模式加入到vlan 2中
若21-24号口用作光口的话配置接口就对应1/xg1-1/xg4代表使用光线做10G上联口用:
c***ole(config)#inte***ce ethernet 1/xg1 //进入汇聚万兆口1,共有4个千兆combo口21-24对应四个1/xg1-1/xg4万兆光口
c***ole(config-if-1/xg1)#
c***ole(config-if-1/xg1)#duplex auto/full/half //设置端口工作模式为 自适应/全双通/半双通
c***ole(config-if-1/xg1)#switchport mode trunk //设置当前端口模式为汇聚口
c***ole(config-if-1/xg1)#switchport mode access //设置当前端口模式为接入模式
c***ole(config-if-1/xg1)#switchport trunk allowed vlan add/remove 1,2 //将当前汇聚端口加入或移除从vlan1,2通过,vlan修剪,默认为all,全部允许
c***ole(config-if-1/xg1)#switchport access vlan 2 //将当前端口以access模式加入到vlan 2中
将端口加入vlan
c***ole(config)#inte***ce ethernet 1/g1
c***ole(config-if-1/g1)#switchport mode access
c***ole(config-if-1/g1)#switchport access vlan 2
将多个端口加入到VLAN中
c***ole(config)#inte***ce range ethernet 1/g1-1/g12 //进入1-12这个接口组里配置
c***ole(config-if)#switchport mode access
c***ole(config-if)#switchport access vlan 2
c***ole#show vlan //用于查看配置后结果
3:设置VTP cisco专有的vlan终极协议也成为局域网干道协议,作用是十几台交换机在企业网中,配置VLAN工作量大,可以使用VTP协议,把一台交换机配置成VTP Server, 其余交换机配置成VTP Client,这样他们可以自动学习到server 上的VLAN 信息
4:交换机配置IP地址
c***ole(config)#inte***ce vlan 1 //进入vlan 1
c***ole(config-if-vlan1)#ip address 119.167.223.221 255.255.255.128 //设置交换机的管理ip地址
c***ole(config)#ip default-gateway 119.167.223.254 //设置交换机的默认网关
c***ole(config)#end //退出当前模式
5: 交换机保存设置命令
c***ole#copy running-config startup-config //将当前正在使用中的配置保存到交换机开机需要加载的配置文件里去。
c***ole#copy running-config backup-config //将当前的配置保存在备份配置文件里
6:交换机显示命令
特权模式下:
c***ole#show running-config //显示当前正在使用的配置信息
c***ole#show startup-config //交换机开机是自动加载的 配置文件
c***ole#show vlan //显示vlaner配置信息
c***ole#show inte***ces configuration ethernet 1/g1 //显示二层端口状态,可以用来决定此口是否为二层或三层口
c***ole#show ip inte***ce vlan100 //查看交换机vlan100的ip配置信息
c***ole#show version //查看交换机固件版本信息
7:基于端口的mac地址绑定
c***ole#config //进入配置视图模式
c***ole(config)#inte***ce ethernet 1/g1 //进入具体端口视图模式下
c***ole(config-if-1/g1)#switchport port-secruity //配置端口安全模式
c***ole(config-if-1/g1)#switchport port-secruity mac-address MAC(主机的mac地址) //配置该端口要绑定的主机的MAC地址
c***ole(config-if)#no switchport port-secruity mac-address MAC(主机的mac地址) //删除绑定主机的mac地址
8:配置交换机的snmp功能
c***ole(config)#snmp-server community xxx ro //xxx为自定义的共同体名称,并且团体的权限为只读。
c***ole(config)#snmp-server host x.x.x.x(ip地址) xxx(团体名) //设置管理机x.x.x.x,同时允许该管理机以团体明xxx访问。
c***ole(config)#snmp-server host 119.167.223.221 zy //例子
c***ole(config)#snmp-server enable traps //启用snmp服务
9:交换机禁ping配置
c***ole(config)#access-list 110 deny icmp any any //配置访问控制列表(Access Control List,ACL)110指的ICMP对应ping。
c***ole(config)#access-list 110 permit ip any any //运行所有的IP协议的应用
c***ole(config)#int vlan 1
c***ole(config-if-vlan1)#ip access-group 110 in
c***ole(config)#int vlan 2
c***ole(config-if-vlan2)#ip access-group 110 in
c***ole(config)#int vlan 3
c***ole(config-if-vlan3)#ip access-group 110 in
c***ole(config)#inte***ce ethernet 1/g1 //端口禁ping
c***ole(config-if-1/g1)#ip access-group 110 in
10:恢复交换机出厂设置
c***ole#clear config //恢复交换机出厂设置
c***ole#reload //重新启动交换机
相关阅读:交换机工作原理过程
交换机工作于OSI参考模型的第二层,即数据链路层。交换机内部的CPU会在每个端口成功连接时,通过将MAC地址和端口对应,形成一张MAC表。在今后的通讯中,发往该MAC地址的数据包将仅送往其对应的端口,而不是所有的端口。因此,交换机可用于划分数据链路层广播,即冲突域;但它不能划分网络层广播,即广播域。
交换机的基本配置命令有哪些
交换机是网络中常用的设备之一,用于连接网络中的不同设备并转发数据。以下是交换机的一些基本配置命令:
配置交换机主机名:hostname 《主机名》
配置管理员登录密码:enable ****** 《密码》
配置Telnet登录密码:line vty 0 15,password 《密码》,login
配置管理IP地址:inte***ce vlan 1,ip address 《IP地址》 《子网掩码》
配置端口VLAN:inte***ce 《端口号》,switchport mode access,switchport access vlan 《VLAN ID》
配置端口速率和双工模式:inte***ce 《端口号》,speed 《速率》,duplex 《双工模式》
配置端口描述信息:inte***ce 《端口号》,description 《描述信息》
查看交换机配置信息:show running-config
保存配置信息:copy running-config startup-config
以上是一些基本的交换机配置命令,可以根据实际需求进行修改和补充。
普通交换机常用配置命令是什么
CISCO交换机基本配置:C***ole端口连接 \x0d\x0a用户模式hostname# ;\x0d\x0a特权模式hostname(config)# ;\x0d\x0a全局配置模式hostname(config-if)# ;\x0d\x0a\x0d\x0a交换机口令设置: \x0d\x0aswitch》enable ;进入特权模式\x0d\x0aswitch#config terminal ;进入全局配置模式\x0d\x0aswitch(config)#hostname csico ;设置交换机的主机名\x0d\x0aswitch(config)#enable ****** csico1 ;设置特权加密口令\x0d\x0aswitch(config)#enable password csico8 ;设置特权非密口令\x0d\x0aswitch(config)#line c***ole 0 ;进入控制台口\x0d\x0aswitch(config-line)#line vty 0 4 ;进入虚拟终端\x0d\x0aswitch(config-line)#login ;虚拟终端允许登录\x0d\x0aswitch(config-line)#password csico6 ;设置虚拟终端登录口令csico6\x0d\x0aswitch#exit ;返回命令\x0d\x0a交换机VLAN创建,删除,端口属性的设置,配置trunk端口,将某端口加入vlan中,配置VTP:\x0d\x0aswitch#vlan database ;进入VLAN设置\x0d\x0aswitch(vlan)#vlan 2 ;建VLAN 2\x0d\x0aswitch(vlan)#vlan 3 name vlan3 ;建VLAN 3并命名为vlan3\x0d\x0aswitch(vlan)#no vlan 2 ;删vlan 2\x0d\x0aswitch(config)#int f0/1 ;进入端口1\x0d\x0aswitch(config)#speed ? 查看speed命令的子命令\x0d\x0aswitch(config)#speed 100 设置该端口速率为100mb/s (10/auto)\x0d\x0aswitch(config)#duplex ? 查看duplex的子命令\x0d\x0aswitch(config)#duplex full 设置该端口为全双工(auto/half)\x0d\x0aswitch(config)#description TO_PC1 这是该端口描述为TO_PC1\x0d\x0aswitch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2\x0d\x0aswitch(config-if)#switchport mode trunk ;设置为trunk模式(access模式)\x0d\x0aswitch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan\x0d\x0aswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继\x0d\x0aswitch(config)#vtp domain vtpserver ;设置vtp域名相同\x0d\x0aswitch(config)#vtp password ;设置发vtp密码\x0d\x0aswitch(config)#vtp server ;设置vtp服务器模式\x0d\x0aswitch(config)#vtp client ;设置vtp客户机模式\x0d\x0a\x0d\x0a交换机设置IP地址,默认网关,域名,域名服务器,配置和查看MAC地址表:\x0d\x0aswitch(config)#inte***ce vlan 1 ;进入vlan 1\x0d\x0aswitch(config-if)#ip address 192.168.1.1 255.255.255.0 ;设置IP地址\x0d\x0aswitch(config)#ip default-gateway 192.168.1.6 ;设置默认网关\x0d\x0aswitch(config)#ip domain-name cisco.com 设置域名\x0d\x0aswitch(config)#ip name-server 192.168.1.18 设置域名服务器\x0d\x0aswitch(config)#mac-address-table? 查看mac-address-table的子命令\x0d\x0aswitch(config)#mac-address-table aging-time 100 设置超时时间为100ms\x0d\x0aswitch(config)#mac-address-table permanent 0000.0c01.bbcc f0/3 加入永久地址在f0/3端口\x0d\x0aswitch(config)#mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7 加入静态地址目标端口f0/6源端口f0/7\x0d\x0aswitch(config)#end\x0d\x0aswitch#show mac-address-table 查看整个MAC地址表\x0d\x0aswitch#clear mac-address-table restricted static 清除限制性静态地址\x0d\x0a交换机显示命令:\x0d\x0aswitch#write ;保存配置信息\x0d\x0aswitch#show vtp ;查看vtp配置信息\x0d\x0aswitch#show run ;查看当前配置信息\x0d\x0aswitch#show vlan ;查看vlan配置信息\x0d\x0aswitch#show inte***ce ;查看端口信息\x0d\x0aswitch#show int f0/0 ;查看指定端口信息\x0d\x0aswitch#show int f0/0 status;查看指定端口状态\x0d\x0aswitch#dir flash: ;查看闪存
交换机的基本命令是什么
“Switch》”
对于思科交换机来说,主要有2种配置途径:其一,使用交换机自带的C***ole线缆连接到计算机的COM口,然后利用计算机的超级终端软件直接配置,首次配置通常使用这种方式;其二,通过telnet方式远程访问、配置交换机,这种方式要求此交换机已配置有IP地址且已接入计算机网络。
1)通过超级终端访问交换机
2)交换机工作模式的进入与退出
步骤一:通过超级终端访问交换机。
1)配置并打开超级终端
在此前通过超级终端访问交换机实验拓扑环境中,单击PC机以打开此设备,确认电源已启动(机箱示意图上的指示灯为黄绿色),切换到“桌面选项卡”,找到其中的“终端”并单击打开。
在弹出的终端配置窗口中,如图-15所示,单击“确定”以接受默认值。
接下来就可以看到“终端”窗口了,其中显示了通过C***ole线连接的交换机初始化信息,回车后可进入交换机的“Switch》”配置系统。
提示:在Packet Tracer环境中,可直接单击交换机图标,然后切换到“命令行”选项卡,也可以进入IOS配置环境。
步骤二:交换机工作模式的进入与退出
1) 交换机工作模式的进入如下:
Switch》enable //切换为特权模式
Switch# configure terminal //进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#inte***ce fastEthernet 0/1 //进入接口模式
Switch(config-if)#
更多文章:

中关村银行app下载(目前哪一家私营银行的存款(50万以内保本保息)利率较高)
2024年3月10日 14:50

诺基亚n gage(诺基亚 N97 怎么安装N-GAGE平台 )
2023年9月12日 03:10

华硕a53s加装固态硬盘(华硕笔记本A53S的主板,硬盘接口是SATA2.0还是SATA3.0的啊可以上固态硬盘吗)
2023年8月14日 01:00

联想fn键驱动下载(联想笔记本fn键没用了,怎么解决要下载什么)
2024年8月14日 17:50

联想锋行startup device menu(电脑系统出现了 STARTUP DEVICE MENU下面有几个选项哪一个是重装系统的)
2024年11月6日 13:10

摩托罗拉x30售价(Moto新机edge x30/s30,配高价低,值得入手吗)
2023年11月18日 12:20

铭影显卡都是二手翻新卡吗(铭影显卡测评铭影GTX750Ti 4G显卡怎么样)
2024年12月3日 16:41

高配低价款iPad能帮苹果挽回败局吗?网上卖的那些超低价的6G运存平板是真的吗你怎么看
2023年11月11日 20:10

尼康d100 d70(我的相机是NIKON D70S 想使用反光板预升功能,该怎么设置啊)
2024年9月13日 23:20

amd准系统(升腾ga690-2amdk14主板能换显卡吗)
2024年6月23日 11:00