H3C交换机基本配置
核心交换机——作为公司核心网络的主要中枢,合理的配置
1.认证方式为Scheme时的Telnet登录配置
dis  cu  查看当前配置 
[h3c]telnet server enable                          //启动Telnet服务 
[h3c]local-user winda                            //创建本地用户winda
[h3c-luser-winda]password cipher 123456          //为本地用户winda创建密文显示的密码 
[h3c-luser-winda]service-type telnet                  //定义该用户的服务类型为telnet 
[h3c-luser-winda]authorization-attribute level 3        //定义该用户的特权级别 
[h3c-luser-winda]quit                              //退出用户配置模式        
[h3c]user-interface vty 0 4                          //设置虚拟用户端口 
[h3c-ui-vty0-4]authentication-mode scheme            //设定远程登录用户的登录方式使用用户名和密码 
[h3c-ui-vty0-4]user privilege level 3                //设置远程登录用户登录后的最高级别 
2.以太网端口的基本配置
(1)二层以太网端口中,包括三种类型:Access、Trunk、Hybrid
Interface Ethernet 1/0/1          //进入以太网端口视图
port link-type access        //access端口:只能属于一个VLAN
port link-type trunk          //trunk端口:属于多个VLAN,只允许默认VLAN的报文发送时不携带VLAN标签
port link-type hybrid        //hybrid端口:属于多个VLAN,可以允许多个VLAN的报文发送时不携带VLAN标签
description text                //设置以太网端口的描述字符串,用来表示该端口
duplex {auto |full |half }          //设置以太网端口的双工模式
speed{10 |100 |1000 |10000 | auto}  //设置以太网端口的速率
(2)以太网端口环回监测功能配置
loopback-detection enable          //开启环回监测功能
(3)端口组配置(手工端口组)
S3610、S5120、S5800系列:
port-group manual  port-group-name  //创建手工端口组,并进入手工端口组视图
S5510-EI系列:
port-group  group-id
S3610、S5120、S5800系列:
group-member  interface-list        //添加二层以太网端口到指定手工端口组中
S5510-EI系列:
port  interface-list
(4)手工端口汇聚组配置
link-aggregation group  agg-id  mode manual            //创建手工汇聚组
link-aggregation group  agg-id  description  agg-name    //配置汇聚组描述符
port link-aggregation group  agg-id                //将以太网端口加入到指定的汇聚组
(5)端口绑定配置
am user-bind {mac-addr  mac-address |ip-addr  ip-address}* interface-list 
//将合法用户的MAC地址和IP地址绑定到指定的端口上
(6)三层接口IP地址配置
interface vlan-interface vlan-id
ip address ip-address {mask |mask-length} [sub]
3.VLAN的基本配置
(1)VLAN的创建
vlan  vlan-id                          //创建VLAN
(2)基于端口VLAN配置
Access端口:
port link-type access              //(可选)默认情况下,端口的链路类型为access类型
port access vlan vlan-id            //将当前access端口加入到指定vlan
Trunk端口:
port link-type trunk              //配置端口的链路类型为trunk类型
port trunk permit vlan {vlan-id-list | all}    //将以上trunk端口加入到指定一个或多个VLAN
port trunk pvid vlan vlan-id              //(可选)设置以上trunk端口的默认VLAN
Hybrid端口:
port link-type hybrid              //配置端口的链路类型为hybrid类型
port hybrid vlan vlan-id-list {tagged |untagged}      //将以上hybrid端口加入到指定的一个或多个VLAN中
port hybrid pvid vlan vlan-id          //(可选)设置以上hybrid端口的默认VLAN
4.端口镜像配置
(1)本地端口镜像配置
mirroring-group  group-id  local          //未镜像组配置源端口,创建本地镜像组
mirroring-group  group-id  mirroring-port  mirroring-port-list  {both |inbound |outbound}                        //在系统视图下配置指定端口为本地镜像组的源端口
interface interface-type  interface-number
mirroring-group  group-id  mirroring-port {both |inbound |outbound}
//在接口视图下配置指定端口为本地镜像组的源端口
mirroring-group  group-id  mirroring-vlan  mirroring-vlan-list  {both | inbound |outbound}
//为本地镜像组配置源vlan,一个镜像组内可以配置多个源vlan
mirroring-group  group-id  monitor-port  monitor-port-id                       
/
/在系统视图下配置指定端口为本地镜像组的目的端口
interface interface-type  interface-number
mirroring-group  group-id  monitor-port
//在接口视图下配置指定端口为本地镜像组的目的端口
(2)二层远程端口镜像配置
a.反射端口方式
b.出端口方式cipher命令
1)低端H3C交换机远程端口镜像的配置,如S3100、S5510、S5600:
充当源交换机时的配置
remote-probe vlan enable                //将当前VLAN配置为远程镜像VLAN
mirroring stp-collaboration              //(可选)开启端口镜像与STP联动功能,开启该功能后,设备将通过监测端口的STP状态来自动控制该端口上的镜像功能是否生效。
mirroring-group  group-id  remote-source          //创建远程源镜像组
mirroring-group  group-id  mirroring-port  mirroring-port-list {both |inbound |outbound}        //配置远程端口镜像源端口
mirroring-group  group-id  reflector-port  reflector-port  //为远程镜像组配置反射端口
mirroring-group  group-id  remote-probe vlan  remote-probe-vlan-id
//为指定远程源镜像组配置远程镜像VLAN
充当中间交换机时的配置
remote-probe vlan enable                //定义当前VLAN配置为远程镜像VLAN
充当目的交换机的配置
remote-probe vlan enable                //定义当前VLAN配置为远程镜像VLAN
mirroring-group  group-id  remote-destination        //配置远程目的镜像组
mirroring-group  group-id  monitor-port  monitor-port //为远程目的镜像组配置目的端口
mirroring-group  group-id  remote-probe vlan  remote-probe-vlan-id
//为远程镜像组配置远程镜像VLAN

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。