网络工程师考试交换机命令

风雨成灰
  • 回答数

    7

  • 浏览数

    14568

首页> 工程师报名> 网络工程师考试交换机命令

7个回答默认排序
  • 默认排序
  • 按时间排序

劣性诗人

已采纳

你好一些常用的命令肯定还是需要记住的在配置华为、思科等路由器或交换机的时候那些常用到的配置端口的命令、划分Vlan的命令这些是要记住的,难道你想当着你老板的面去看书或去上网搜索嘛希望能帮到你

44评论

我在别走

可以记住比较常用的比如ip route等,到时候用到了可以查手册的~

159评论

回头笑

首先,主要的配置命令例如:交换机,路由器的基本配置(主机名,密码,vty,console,标识),基本路由协议,NAT、VLAN,QOS,VTP,STP,ACL,PPP,frame-relay等等的配置,这些都是必须掌握的,你不可能在一边配一边还在看字典吧。当然,有时候我们会查看一些资料,那是再做一些决策的时候会用到以上是一名合格的网络工程师必须做到的,另外就是在你参加一些考试,例如ccna,ccnp软考等考试时也会遇到一些要你配置的题目

22评论

眸里迷彩情话予狗

房东那里交换机不是可网管的,你那个路由器插上网线就可以用,不要插错口,插普通口,不要路由功能,就当个交换机使用就可以,地址是自动获取的吧

34评论

久失他心

cisco交换机配置清除、启动及基本配置 CISCO交换机基本配置 switch>ena 进入特权模式 switch#erase nvram 全部清除交换机的所有配置 switch#reload 重新启动交换机(初始提示符为switch> )------------------------------------------------------------------------------------CISCO交换机基本配置:Console端口连接用户模式hostname> ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;交换机口令设置:switch>enable ;进入特权模式switch#config;进入全局配置模式switch(config)#hostname csico ;设置交换机的主机名switch(config)#enable secret csico1 ;设置特权加密口令switch(config)#enable password csico8 ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;虚拟终端允许登录switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6switch#write 保存配置设置switch#copy running-config startup-config 保存配置设置,与write一样switch#exit ;返回命令配置终端过一会时间就会由全局配置模式自动改为用户模式,将超时设置为永不超时switch#conf tswitch(config)#line con 0switch(config-line)#exec-timeout 0---------------------------------------------------------------------------------交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show vlan name vlan2switch#show interface ;查看端口信息switch#show int f00 ;查看指定端口信息switch#show int f00 status;查看指定端口状态switch#show interface statusswitch#dir flash: ;查看闪存switch#show running-config switch(config)#do show running-config 显示存储在内存中的当前正确配置文件。show startup-configuration:显示存储在非易失性存储器(NVRAM)的配置文件。 show users:显示所有连接到路由器的用户。 show hosts:显示主机名和地址信息。 switch(config)#do show interfaceswitch(config-if)#do show int f021 switch#show arpswitch#show mac-address-table------------------------------------------------------------------------------ 2960交换机上配置,配置IP及网关 switch#conf t switch(config)#interface vlan1 进入vlan 1特殊接口配置模式 switch(config-if)#ip address 设置交换机的管理IP地址 switch(config)#ip default-gateway设置交换机的网关地址 switch(config)#ip domain-name设置交换机所连域的域名 switch(config)#no ip domain-nameswitch#ip name-server设置交换机所连域的域名服务器IP switch#show int vlan 1 查看交换机的VLAN 1特殊接口配置信息 switch#show run 查看交换机的当前运行配置等全部信息--------------------------------------------------------------------------------交换机VLAN创建,删除,端口属性的设置,配置trunk端口,将某端口加入vlan中,配置VTP:switch(config)#vlan 2switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#vlan 3 name vlan3 ;建VLAN 3并命名为vlan3switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f01 ;进入端口1switch(config)#speed ? 查看speed命令的子命令switch(config)#speed 100 设置该端口速率为100mbs (10auto)switch(config-if)#do show int f021 显示21口配置信息switch(config-if)#shut ;shutdown 关闭当前端口switch(config-if)#no shut ;no shutdown 开启当前端口switch(config)#duplex ?查看duplex的子命令switch(config)#duplex full 设置该端口为全双工(autohalf)switch(config)#description TO_PC1 这是该端口描述为TO_PC1switch(config)#interface f021switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为trunk模式(access模式)switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain vtpserver ;设置vtp域名相同switch(config)#vtp password ;设置发vtp密码switch(config)#vtp server ;设置vtp服务器模式switch(config)#vtp client ;设置vtp客户机模式---------------------------------------------------------------------------------------交换机设置IP地址,默认网关,域名,域名服务器,配置和查看MAC地址表:switch(config)#interface vlan 1 ;进入vlan 1switch(config-if)#ip address ;设置IP地址switch(config)#ip default-gateway;设置默认网关switch(config)#ip domain-name设置域名switch(config)#ip name-server设置域名服务器switch(config)#mac-address-table? 查看mac-address-table的子命令switch(config)#mac-address-table aging-time 100设置超时时间为100msswitch(config)#mac-address-table permanentf03 加入永久地址在f03端口switch(config)#mac-address-table restricted staticf06 f07 加入静态地址目标端口f06源端口f07switch(config)#endswitch#show mac-address-table 查看整个MAC地址表switch#clear mac-address-table restricted static 清除限制性静态地址-----------------------------------------------------------------------------------交换机端口加入vlan将多个端口加入到VLAN2switch(config)#interface range fa 017-24switch(config-if-range)#switchport access vlan 2单个端口加入VLANswitch(config)#interface f01switch(config-if-range)#switchport access vlan 2--------------------------------------------------------------------------------交换机的端口和MAC地址表的设置2960交换机配置端口属性 switch#conf t switch#interface ethernet 01 进入第1个端口 switch#description switch-e01-pc1 给端口写入注释信息 switch#duplex autofullfull-flow-controlhalf 设置端口的工作模式 switch#port secure 启用端口安全性 switch#port secure max-mac-count 1 设置该端口允许对应的MAC地址数(默认132个) switch#sh mac-address-table security 查看端口安全性2912交换机配置端口属性 switch#conf t 进入全局配置模式 switch#interface fastethernet 01 进入第1个端口 switch#description switch-f01-pc1 给端口写入注释信息 switch#duplex autofullhalf 设置端口的工作模式 switch#port security 启用端口安全性 switch#port security max-mac-count 1 设置该端口允许对应的MAC地址数(默认132个) switch#end 返回特权模式 switch#sh port security 查看端口安全性配置和查看MAC地址表1924交换机配置MAC地址表 switch#mac-address-table aging-time 600 设置动态地址超时时间 switch#mac-address-table permanente03 定义永久MAC地址(绑定MAC地址) switch#mac-address-table restricted statice06 e07 定义受限MAC地址 switch#address-violation disableignoresuspend 定义地址安全违规 switch#show mac-address-table 查看上述配置 switch#clear mac-addr restric static 清除受限MAC地址表项2912交换机配置MAC地址表 switch#mac-address-table aging-time 700 设置动态地址超时时间 switch#mac-address-table statice03 定义永久MAC地址(绑定MAC地址) switch#mac-address-table securef03 vlan 1 定义受限MAC地址 switch#port security action shutdowntrap 定义地址安全违规 switch#show port security 查看上述配置 配置VTP、VLAN、VLAN Trunk和STP配置VTP switch#conf t switch#vtp server 定义VTP的工作模式 switch#vtp domain cisco 定义VTP的域名 switch#trunk on 启用干道 switch#vtp domain cisco 加入VTP域 switch#vtp client 定义VTP的工作模式 switch#trunk on 启用干道 switch#show trunk b switch#show trunk b allowed-vlans 查看干道信息配置VLAN switch#vlan 10 dept1 switch#vlan 20 dept2 switch#vlan 30 dept3 switch#vlan 40 dept4 定义所需VLAN switch#show vlan 查看VLAN信息 switch#show vlan switch#show vtp 查看VTP的信息 switch#int e01 switch#vlan-membership static 10 switch#int e02 switch#vlan-membership static 20 switch#int e03 switch#vlan-membership static 30 switch#int e04 switch#vlan-membership static 40 把接口划入各自VLAN配置spanning tree switch#spantree 1 启用生成树协议 switch#sh spantree 1 查看生成树信息 switch#no spantree 1 关闭生成树协议 switch#sh spantree 1 查看生成树信息交换机上屏蔽个别MAC地址方法configure terminalinterface gigabitEthernet 020switchportsw mode accsw port-secsw port-sec mac-add [macaddress]sw port-sec max 1sw port-sec violation restrict

115评论

拥你入眠伴你入睡

只要是能用的命令就行!

45评论

情话烫耳情笔刺手

错,交换机可配置的要配置数据,不可配置的只要插上就可以上网的,不过你的方法不对,设备也不对,就是配置对了也不能上的,一、首先,你用的是猫,就是拨号上的网,要用户名与密码的,这就决定了交换机是不行的,你要换成路由器,我假设你有一个路由器,不管什么牌子的,只要你有,然后你把猫出来的线插在路由器的WAN口,就是进线口,然后你电脑的网口线与路由器的LAN口相连,然后在IE浏览器里输入192。 ,会弹出一个对话框的,大多数路由器默认的用户名与密码都是admin 当然,前提是新路由器或你以前没有改过路由器的初始密码。在路由器的WAN口选项里输入你猫的用户名与密码。一步一步按着它弹出的提示来做。二、你路由器会有四到八或更多的LAN口,就是除了WAN口以外的口,这些都可以直接在电脑上用的,插在电脑上就可以上网了,如果你想更多的电脑上网的话,你可能把其中一个口用来连交换机,这样的话,交换机剩下的口也能上网啦,都不要配置,要配置的都是企业级的交换机与路由器,这些是网络工程师去做的,家用的都是傻瓜级的,是即插即用的,呵呵!

58评论

相关问答

    向你推荐

      热门问题