交换机各设备的配置命令.docx
- 文档编号:8035725
- 上传时间:2023-05-12
- 格式:DOCX
- 页数:9
- 大小:15.42KB
交换机各设备的配置命令.docx
《交换机各设备的配置命令.docx》由会员分享,可在线阅读,更多相关《交换机各设备的配置命令.docx(9页珍藏版)》请在冰点文库上搜索。
交换机各设备的配置命令
交换机各设备的配置命令
3层交换机多出的就是路由能力,体现在vlan的互相通信功能和端口的路由能力,下面介绍:
开启路由功能:
iprouting
进入vlan配置网段网关与路由配置接口相同
interfacevlan1
ip_2._8.1.1255.255.255.0
路由配置与路由器配置相同只是把接口换为VLAN+VLAN号,开启接口路由功能,进入接口配置:
noswichport
2.该公司的核心交换机配置如下:
switchenable
switch_configterminal
switch_hostnameCenter
Center_vlandatabase
Center(vlan)_vlan2nameManagerment
Center(vlan)_vlan3nameHR
Center(vlan)_vlan4nameFinancial-
Center(vlan)_vtpdomainzitong
Center(vlan)_vtpserver
Center(vlan)_vtppasswordzitong
Center(vlan)_end
Center_configureterminal
Center(config)_iprouting-----开启路由功能
Center(config)_interfacerangef0/24-------高层管理部所属端口
Center(config-if)_switchportaccessvlan2-------当前端口加入vlan2
Center(config-if)_switchportmodetrunk------设置为干线
Center(config-if)_switchporttrunkallowedvlan1,2,3----设置允许的vlan
Center(config-if)_switchporttrunkencapdot1q;设置vlan中继
Center(config-if)_noshutdown
Center(config-if)_interfacerangefa0/5_-------人力资源部所属端口
Center(config-if)_switchportaccessvlan3
Center(config-if)_interfacef0/3
Center(config-if)_swithcportmodetrunk
Center(config-if)_switchporttrunkallowedvlan1,2,3,4
Center(config-if)_switchporttrunkencapdot1q
Center(config-if)_noshutdown
Center(config-if)_interfacerangefa0/__-------财务部所属端口
Center(config-if)_switchportaccessvlan4
Center(config-if)_interfacef0/3
Center(config-if)_swithcportmodetrunk
Center(config-if)_switchporttrunkallowedvlan1,2,3,4
Center(config-if)_switchporttrunkencapdot1q
Center(config-if)_noshutdown
Center(config)_intvlan2
Center(config-if)_ipadd_2._8._.0255.255.255.0
Center(config-if)_noshut
Center(config)_intvlan3
Center(config-if)_ipadd_2._8._.0255.255.255.0
Center(config-if)_noshut
Center(config)_intvlan4
Center(config-if)_ipadd_2._8.25.0255.255.255.0
Center(config-if)_noshut
Center(config-if)_e_it
Center_showvtpstatus--查看VTP配置信息
(二)接入层交换机的配置
接入层交换机,配置命令相似,以一台为例:
switchenable
switch_configterminal
switch_hostnameManagerment1
Managerment1_vlandatabase
Managerment1(vlan)_vtpdomainzitong
Managerment1(vlan)_vtpclient
Managerment1(vlan)_vtppasswordzitong
Managerment1(vlan)_end
Managerment1_showvtpstatus--查看是否学习到vlan
再把各端口划到相应的vlan中,格式如下:
SW(config)_interfacerangef0/1-_
SW(config-range-if)_switchportmodeaccess
SW(config-range-if)_switchportaccessallowedvlan3
SW(config-range-if)_noshut
(三)路由器的配置
iproute+非直连网段+子网掩码+下一跳地址配置静态/默认路由
showiproute查看路由表
showprotocols显示出所有的被动路由协议和接口上哪些协议被设置
showipprotocols显示了被配置在路由器上的路由选择协议,同时给出了在路由选择协议中使用的定时器等信息
routerrip激活RIP协议
network+直连网段发布直连网段
interfacelookback0激活逻辑接口
passive-interface+接口类型+接口号配置接口为被动模式
debugip+协议动态查看路由更新信息
undebugall关闭所有DEBUG信息
routereigrp+as号激活EIGRP路由协议
network+网段+子网掩码发布直连网段
showipeigrpneighbors查看邻居表
showipeigrptopology查看拓扑表
showipeigrptraffic查看发送包数量
routerospf+process-ID激活OSPF协议
network+直连网段+area+区域号发布直连网段
showipospf显示OSPF的进程号和ROUTER-ID
encapsulation+封装格式更改封装格式
noipadmain-lookup关闭路由器的域名查找
iprouting在三层交换机上启用路由功能
showuser查看SW的在线用户
clearline+线路号清除线路
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 交换机 设备 配置 命令