三层交换机典型应用配置Word格式文档下载.docx
《三层交换机典型应用配置Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《三层交换机典型应用配置Word格式文档下载.docx(14页珍藏版)》请在冰豆网上搜索。
创建(进入)VLAN10
[SwitchA]vlan10
将E0/1加入到VLAN10
[SwitchA-vlan10]portEthernet0/1
创建(进入)VLAN接口10
[SwitchA]interfaceVlan-interface10
为VLAN接口10配置IP地址
[SwitchA-Vlan-interface10]ipaddress10.1.1.1255.255.255.0
创建(进入)VLAN20
[SwitchA]vlan20
将E0/2加入到VLAN20
[SwitchA-vlan20]portEthernet0/2
7.
创建(进入)VLAN接口20
[SwitchA]interfaceVlan-interface20
8.
为VLAN接口20配置IP地址
[SwitchA-Vlan-interface20]ipaddress20.1.1.1255.255.255.0
9.
创建(进入)VLAN100
[SwitchA]vlan100
10.
将E0/24加入到VLAN100
[SwitchA-vlan100portEthernet0/24
11.
创建(进入)VLAN接口100
[SwitchA]interfaceVlan-interface100
12.
为VLAN接口100配置IP地址
[SwitchA-Vlan-interface100]ipaddress192.168.1.2255.255.255.0
「SwitchA路由设置」
13.
设置交换机的默认路由的下跳到RouteA
[SwitchA]iproute0.0.0.00.0.0.0192.168.1.1
「RouteA路由设置」
14.
在RouteA上设置到SwitchA的回程路由
[RouteA]iproute10.1.1.0255.255.255.0192.168.1.2
[RouteA]iproute20.1.1.0255.255.255.0192.168.1.2
「补充说明」
交换机的VLAN虚接口承载在物理端口之上,即某VLAN所包含的物理端口UP之后,该VLAN虚接口才会UP.
对于三层交换机,可以为多个VLAN接口配置IP地址,而且默认情况下各个VLAN接口之间可以访问;
对于二层交换机来说,为VLAN接口配置的IP地址只能用于管理。
更多请看Cisco与华为技术网(V)三层交换、交换机与路由器密码恢复、交换机选购专题,或进入论坛讨论。
1.在基于IOS的交换机上设置主机名/系统名:
switch(config)#hostnamehostname
在基于CLI的交换机上设置主机名/系统名:
switch(enable)setsystemnamename-string
2.在基于IOS的交换机上设置登录口令:
switch(config)#enablepasswordlevel1password
在基于CLI的交换机上设置登录口令:
switch(enable)setpassword
switch(enable)setenalbepass
3.在基于IOS的交换机上设置远程访问:
switch(config)#interfacevlan1
switch(config-if)#ipaddressip-addressnetmask
switch(config-if)#ipdefault-gatewayip-address
在基于CLI的交换机上设置远程访问:
switch(enable)setinterfacesc0ip-addressnetmaskbroadcast-address
switch(enable)setinterfacesc0vlan
switch(enable)setiproutedefaultgateway
4.在基于IOS的交换机上启用和浏览CDP信息:
switch(config-if)#cdpenable
switch(config-if)#nocdpenable
为了查看Cisco邻接设备的CDP通告信息:
switch#showcdpinterface[typemodle/port]
switch#showcdpneighbors[typemodule/port][detail]
在基于CLI的交换机上启用和浏览CDP信息:
switch(enable)setcdp{enable|disable}module/port
switch(enable)showcdpneighbors[module/port][vlan|duplex|capabilities|detail]
5.基于IOS的交换机的端口描述:
switch(config-if)#descriptiondescription-string
基于CLI的交换机的端口描述:
switch(enable)setportnamemodule/numberdescription-string
6.在基于IOS的交换机上设置端口速度:
switch(config-if)#speed{10|100|auto}
在基于CLI的交换机上设置端口速度:
switch(enable)setportspeedmoudle/number{10|100|auto}
switch(enable)setportspeedmoudle/number{4|16|auto}
7.在基于IOS的交换机上设置以太网的链路模式:
switch(config-if)#duplex{auto|full|half}
在基于CLI的交换机上设置以太网的链路模式:
switch(enable)setportduplexmodule/number{full|half}
8.在基于IOS的交换机上配置静态VLAN:
switch#vlandatabase
switch(vlan)#vlanvlan-numnamevla
switch(vlan)#exit
switch#configureteriminal
switch(config)#interfaceinterfacemodule/number
switch(config-if)#switchportmodeaccess
switch(config-if)#switchportaccessvlanvlan-num
switch(config-if)#end
在基于CLI的交换机上配置静态VLAN:
switch(enable)setvlanvlan-num[namename]
switch(enable)setvlanvlan-nummod-num/port-list
9.在基于IOS的交换机上配置VLAN中继线:
switch(config)#interfaceinterfacemod/port
switch(config-if)#switchportmodetrunk
switch(config-if)#switchporttrunkencapsulation{isl|dotlq}
switch(config-if)#switchporttrunkallowedvlanremovevlan-list
switch(config-if)#switchporttrunkallowedvlanaddvlan-list
在基于CLI的交换机上配置VLAN中继线:
switch(enable)settrunkmodule/port[on|off|desirable|auto|nonegotiate]
Vlan-range[isl|dotlq|dotl0|lane|negotiate]
10.在基于IOS的交换机上配置VTP管理域:
switch(vlan)#vtpdomaindomain-name
在基于CLI的交换机上配置VTP管理域:
switch(enable)setvtp[domaindomain-name]
11.在基于IOS的交换机上配置VTP模式:
switch(vlan)#vtp{sever|cilent|transparent}
switch(vlan)#vtppasswordpassword
在基于CLI的交换机上配置VTP模式:
switch(enable)setvtp[domaindomain-name][mode{sever|cilent|transparent}][passwordpassword]
12.在基于IOS的交换机上配置VTP版本:
switch(vlan)#vtpv2-mode
在基于CLI的交换机上配置VTP版本:
switch(enable)setvtpv2enable
13.在基于IOS的交换机上启动VTP剪裁:
switch(vlan)#vtppruning
在基于CLI的交换机上启动VTP剪裁:
switch(enable)setvtppruningenable
14.在基于IOS的交换机上配置以太信道:
switch(config-if)#portgroupgroup-number[distribution{source|destination}]
在基于CLI的交换机上配置以太信道:
switch(enable)setportchannelmoudle/port-rangemode{on|off|desirable|auto}
15.在基于IOS的交换机上调整根路径成本:
switch(config-if)#spanning-tree[vlanvlan-list]costcost
在基于CLI的交换机上调整根路径成本:
switch(enable)setspantreeportcostmoudle/portcost
switch(enable)setspantreeportvlancostmoudle/port[costcost][vlan-list]
16.在基于IOS的交换机上调整端口ID:
switch(config-if)#spanning-tree[vlanvlan-list]port-priorityport-priority
在基于CLI的交换机上调整端口ID:
switch(enable)setspantreeportpri{mldule/port}priority
switch(enable)setspantreeportvlanpri{module/port}priority[vlans]
17.在基于IOS的交换机上修改STP时钟:
switch(config)#spanning-tree[vlanvlan-list]hello-timeseconds
switch(config)#spanning-tree[vlanvlan-list]forward-timeseconds
`switch(config)#spanning-tree[vlanvlan-list]max-ageseconds
在基于CLI的交换机上修改STP时钟:
switch(enable)setspantreehellointerval[vlan]
switch(enable)setspantreefwddelaydelay[vlan]
switch(enable)setspantreemaxageagingtiame[vlan]
18.在基于IOS的交换机端口上启用或禁用PortFast特征:
switch(config-if)#spanning-treeportfast
在基于CLI的交换机端口上启用或禁用PortFast特征:
switch(enable)setspantreeportfast{module/port}{enable|disable}
19.在基于IOS的交换机端口上启用或禁用UplinkFast特征:
switch(config)#spanning-treeuplinkfast[max-update-ratepkts-per-second]
在基于CLI的交换机端口上启用或禁用UplinkFast特征:
switch(enable)setspantreeuplinkfast{enable|disable}[rateupdate-rate][all-protocolsoff|on]
20.为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令:
switch(config)#clusterenablecluster-name
21.为了从一条中继链路上删除VLAN,可使用下列命令:
switch(enable)cleartrunkmodule/portvlan-range
22.用showvtpdomain显示管理域的VTP参数.
23.用showvtpstatistics显示管理域的VTP参数.
24.在Catalyst交换机上定义TrBRF的命令如下:
switch(enable)setvlanvlan-name[namename]typetrbrfbridgebridge-num[stp{ieee|ibm}]
25.在Catalyst交换机上定义TrCRF的命令如下:
switch(enable)setvlanvlan-num[namename]typetrcrf
{ringhex-ring-num|decringdecimal-ring-num}parentvlan-num
26.在创建好TrBRFVLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:
switch(enable)setvlanvlan-nummod-num/port-num
27.命令showspantree显示一个交换机端口的STP状态.
28.配置一个ELAN的LES和BUS,可以使用下列命令:
ATM(config)#interfaceatmnumber.subintmultioint
ATM(config-subif)#laneserber-busethernetelan-name
29.配置LECS:
ATM(config)#lanedatabasedatabase-name
ATM(lane-config-databade)#nameelan1-nameserver-atm-addressles1-nsap-address
ATM(lane-config-databade)#nameelan2-nameserver-atm-addressles2-nsap-address
ATM(lane-config-databade)#name…
30.创建完数据库后,必须在主接口上启动LECS.命令如下:
ATM(config)#interfaceatmnumber
ATM(config-if)#laneconfigdatabasedatabase-name
ATM(config-if)#laneconfigauto-config-atm-address
31.将每个LEC配置到一个不同的ATM子接口上.命令如下:
ATM(config)#interfaceatmnumber.subintmultipoint
ATM(config)#laneclientethernetvlan-numelan-num
32.用showlaneserver显示LES的状态.
33.用showlanebus显示bus的状态.
34.用showlanedatabase显示LECS数据库可内容.
35.用showlaneclient显示LEC的状态.
36.用showmodule显示已安装的模块列表.
37.用物理接口建立与VLAN的连接:
router#configureterminal
router(config)#interfacemediamodule/port
router(config-if)#descriptiondescription-string
router(config-if)#ipaddressip-addrsubnet-mask
router(config-if)#noshutdown
38.用中继链路来建立与VLAN的连接:
router(config)#interfacemodule/port.subinterface
router(config-ig)#encapsulation[isl|dotlq]vlan-number
router(config-if)#ipaddressip-addresssubnet-mask
39.用LANE来建立与VLAN的连接:
router(config)#interfaceatmmodule/port
router(config-if)#noipaddress
router(config-if)#atmpvc105qsaal
router(config-if)#atmpvc2016ilni
router(config-if)#interfaceatmmodule/port.subinterfacemultipoint
router(config-if)#laneclientethernetelan-num
router(config-if)#ipaddressip-addresssubnet-name
router(config-if)#laneclientethernetelan-name
router(config-if)#…
40.为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:
router(config)#iprouting
router(config)#routerip-routing-protocol
router(config-router)#networkip-network-number
router(config-router)#networkip-network-number
H3C防火墙常用配置命令
2009-10-1911:
21
配置防火墙网页登陆
1.配置防火墙缺省允许报文通过。
<
H3C>
system-view
[H3C]firewallpacket-filterdefaultpermit
2.为防火墙的以太网接口(以Ethernet0/0为例