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.出端口方式
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
2)中高端H3C交换机二层远程端口镜像的配置
?远程源镜像组配置:
mirroring-group group-id remote-source //创建远程源镜像组
●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
●mirroring-group group-id monitor-egress monitor-egress-port-id
//系统视图下配置指定端口为远程源镜像组的出端口
●interface interface-type interface-number
mirroring-group group-id monitor-egress
//接口视图下配置指定端口为远程源镜像组的出端口
●mirroring-group group-id reflector-port reflector-port
//系统视图下配置指定端口为远程源镜像组的反射端口
●interface interface-type interface-number
mirroring-group group-id reflector-port
//接口视图下配置指定端口为远程源镜像组的反射端口
mirroring-group group-id remote-probe vlan remote-probe-vlan-id
//为远程源镜像组配置远程镜像VLAN
?远程目的镜像组配置
mirroring-group group-id remote-destination //配置远程目的镜像组
●mirroring-group group-id monitor-port monitor-port-id
//系统视图下配置指定端口为远程目的镜像组的目的端口
●interface interface-type interface-number
mirroring-group group-id monitor-port
//接口视图下配置指定端口为远程目的镜像组的目的端口
mirroring-group group-id remote-probe vlan remote-probe-vlan-id
//为远程目的镜像组配置远程镜像VLAN
(3)三层远程端口镜像配置
1)GRE隧道的配置
interface tunnel interface-number //创建一个Tunnel接口,并进入该视图
ip address ip-address {mask | mask-length} //设置Tunnel接口的IPV4地址
tunnel-protocol gre //配置隧道模式为GRE隧道模式source {ip-address | interface-type interface-number} //设置Tunnel接口的源端地址或接口
destination ip-address //设置Tunnel接口的目的端地址2)三层远程端口镜像配置
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-cpu slot slot-number-list{both | inbound |outbound}
//(仅S58系列支持)在系统视图下为本地镜像组配置源CPU
●mirroring-group group-id monitor-port monitor-port-id
//系统视图下为本地镜像组配置目的端口
●interface interface-type interface-number
mirroring-group group-id monitor-port
//接口视图下为本地镜像组配置目的端口
5.DHCP基本配置举例
常见的DHCP组网方式可分为两类:一种是DHCP服务器和客户端都在一个子网内,直接进行DHCP 协议的交互;第二种是DHCP 服务器和客户端分别处于不同的子网中,必须通过DHCP 中继代理实现IP 地址的分配。
(1)DHCP地址池的配置
示例一:DHCP 服务器为同一网段中的客户端动态分配IP 地址,地址池网段10.1.1.0/24 分为两个网段:10.1.1.0/25 和10.1.1.128/25。DHCP 服务器两个Ethernet 接口地址分别为10.1.1.1/25 和10.1.1.129/25。网段10.1.1.0/25 内的地址租用期限为10 天12 小时,域名为https://www.doczj.com/doc/dc9937237.html,,DNS 地址为10.1.1.2,无NetBIOS 地址,出口路由器地址为10.1.1.126;网段10.1.1.128/25 网段内的地址租用期限为5 天,DNS 地址为10.1.1.2,NetBIOS 地址为10.1.1.4,出口路由器的地址为10.1.1.254。
# 启动DHCP 服务
dhcp enable
# 配置接口工作在DHCP 服务器模式下,并从全局地址池中分配IP 地址。
dhcp select global interface ethernet 0/0/0 to ethernet 0/0/1
# 配置不参与自动分配的IP 地址(DNS、NetBIOS 和出口网关地址)。
dhcp server forbidden-ip 10.1.1.2
dhcp server forbidden-ip 10.1.1.4
dhcp server forbidden-ip 10.1.1.126
dhcp server forbidden-ip 10.1.1.254
# 配置DHCP 地址池0 的共有属性(地址池范围、DNS 地址)。
dhcp server ip-pool 0
network 10.1.1.0 mask 255.255.255.0
dns-list 10.1.1.2
# 配置DHCP 地址池1 的属性(地址池范围、出口网关、地址租用期限)。
dhcp server ip-pool 1
network 10.1.1.0 mask 255.255.255.128
domain-name https://www.doczj.com/doc/dc9937237.html,
gateway-list 10.1.1.126
expired day 10 hour 12
# 配置DHCP 地址池2 的属性(地址池范围、出口网关、NetBIOS 地址、地址租用期限)。
dhcp server ip-pool 2
network 10.10.1.128 mask 255.255.255.128
expired day 5
nbns-list 10.1.1.4
gateway-list 10.1.1.254
(2)DHCP中继配置
dhcp enable
dhcp relay server-group group-id ip ip-address
interface Vlan-interface vlan-id
ip address ip-address {mask |mask-length} [sub]
dhcp select relay
dhcp relay server-select group-id
6.SNMP配置
snmp-agent sys-info contact
//设置管理员的标识及联系方法,请把替换为你要设置成的值,下同。这个值初始是HuaWei BeiJing China,用指令display current-configuration可以在当前执行的配置的靠末尾
看到该项。
snmp-agent sys-info location
//设置交换机的位置信息,这项初始没有设置。
snmp-agent community read public
//设置一个华为交换机snmp Community,使用该Community连接交换机时,只可以读取其华为交换机snmp信息。你可以把指令中的public换成你想要的字符串。
snmp-agent community write private
//设置一个华为交换机snmp Community,使用该Community连接交换机时,不仅可以读取其华为交换机snmp信息,还可以将值写入华为交换机snmp的MIB对象,实现对设备进行配置。你可以把指令中的private换成你想要的字符串。
snmp-agent sys-info version all
//设置交换机支持的华为交换机snmp协议,有v1,v2c,v3这3个版本,如果你不确定,最好设为all,将会同时支持这3个协议。在S3050C-0025上初始是只支持v3版本的,如果你没有正确设定它,mibbrower等一些读取软件可能会无法读取信息。
7.ACL配置
基本ACL:编号范围:2000~2999
高级ACL:编号范围:3000~3999
二层ACL:编号范围:4000~4999
(1)基本ACL配置
acl number acl-number [name acl-name][match-order {auto | config }]
//创建基本ACL并进入基本ACL视图
description text//(可选)定义ACL的描述信息
step step-value//(可选)定义ACL规则编号步长
rule [rule-id]{deny | permit }[counting |fragment |logging |source {sour-addr sour-wildcard| any} | time-range time-range-name|vpn-instance vpn-instance-name]*
//为以上IPV4基本ACL创建一条规则
rule rule-id comment text //(可选)为指定的规则配置描述信息
hardware-count enable //(可选)开启基于硬件应用的ACL统计功能
(2)高级ACL配置
acl number acl-number [name acl-name][match-order {auto | config }]
//创建IPV4高级ACL并进入高级ACL视图
description text//(可选)定义ACL的描述信息
step step-value//(可选)定义ACL规则编号步长
rule[rule-id]{deny| permit}protocol[{{ ack ack-value|fin fin-value|psh psh-value|rst rst-value|syn syn-value|urg urg-value}* |established} |counting |destination{dest-addr dest-wildcard|any} |destination-port operator port1[port2] | dscp dscp|fragment|icmp-type {icmp-type icmp-code|icmp-message} | logging | precedence precedence |reflective |source {sour-addr sour-wildcard | any} |source-port|operator port1[port2] |time-range time-range-name|tos tos |vpn-instance vpn-instance-name]*
//为以上IPV4高级ACL创建一条规则
rule rule-id comment text //(可选)为指定的规则配置描述信息
hardware-count enable //(可选)开启基于硬件应用的ACL统计功能
(3)二层ACL配置
acl number acl-number [name acl-name][match-order {auto | config }]
//创建二层ACL并进入二层ACL视图
description text//(可选)定义ACL的描述信息
step step-value//(可选)定义ACL规则编号步长
rule[rule-id]{deny| permit} [cos vlan-pri|counting|dest-mac dest-addr dest-mask|{lsap lsap-type lsap-type-mask|type protocol-type protocol-type-mask} |source-mac sour-addr source-mask |time-range time-range-name ]*
//定义二层ACL规则
rule rule-id comment text //(可选)为指定的规则配置描述信息
hardware-count enable //(可选)开启基于硬件应用的ACL统计功能
(4)ACL应用配置
acl copy {source-acl-number |name source-acl-name} to {dest-acl-number|name dest-acl-name}
//ACL复制
packet-filter vlan vlan-id inbound acl-rule
//(可选)在指定VLAN中应用ACL,对VLAN中的所有端口上接收到的数据包进行过滤
8.QoS配置
(1)定义流分类和匹配规则;
(2)定义流行为;
(3)定义QoS策略,并将流分类和流行为绑定在一起;
(4)应用QoS策略。
●定义流分类
traffic classifier tcl-name [operator {and |or }] //定义一个流分类,并进入类视图
if-match match-criteria //定义对应流分类的匹配规则
●定义流行为
traffic behavior behavior-name//定义流行为,并进入流行为视图
●定义QoS策略
qos policy policy-name//定义策略并进入视图
classifier tcl-name behavior behavior-name [mode {dcbx |dot1q-tag-manipulation}] //在策略中为类指定采用的流行为
●应用QoS策略
1)基于全局应用QoS策略
qos apply policy policy-name global {inbound |outbound}
2)基于端口应用QoS策略
qos apply policy policy-name {inbound |outbound}
3)基于在线用户应用QoS策略
user-profile profile-name //创建User Profile并进入相应的user-profile视图
qos apply policy policy-name {inbound |outbound}
//在对应的在线用户上应用指定关联的QoS策略
user-profile profile-name enable //激活User profile
4)基于VLAN应用QoS策略
qos vlan-policy policy-name vlan vlan-id-list {inbound |outbound}
5)基于控制平面应用QoS策略
control-plane slot slot-number //进入控制平面视图
qos apply policy policy-name inbound //在控制平面入方向上应用指定的QoS策略
9.IRF配置
(1)Fabric端口配置
fabric-port interface-type interface-number enable //在系统视图下开启Fabric端口
interface interface-type interface-number
port link-type irf-fabric //在对应以太网端口视图下将对应以太网端口配置为Fabric端口
(2)UnitID配置
change self-unit to {unit-id | auto-numbering} //系统视图下配置本地交换机的UnitID
1)更改当前交换机的UnitID
change unit-id to unit-id | auto-numbering
2)修改堆叠中其他交换机的UnitID
change unit-id unit-id1 to {unit-id2 | auto-numbering}
3)保存或取消设置更改
fabric save-unit-id
10.IRF2配置
(1)IRF基本配置
irf domain domain-id//IRF域编号配置
irf member member-id renumber new-member-id//IRF2成员编号配置
(2)IRF2端口配置
irf-port member-id/port-number //创建IRF2逻辑端口,进入IRF2逻辑端口视图
port group interface interface-type interface-number[mode {enhanced |normal }] //将IRF2逻辑端口和IRF2物理端口绑定
irf-port-configuration active //激活设备中所有IRF2逻辑端口下的配置(3)IRF2成员优先级配置
irf member member-id priority priority
(4)IRF2成员设备描述信息配置
irf member member-id description text
(5)IRF2链路负载分担类型配置
irf-port load-sharing mode {destination-ip |destination-mac |source-ip |source-mac}*
(6)IRF2的桥MAC保留时间配置
irf mac-address persistent {timer |always}
(7)启用IRF2系统启动文件的自动加载功能
irf auto-update enable
(8)IRF2链路down延迟上报功能配置
irf link-delay interval
(9)IRF2 MAD配置
IRF2支持多IRF2的三种MAD检测方式:LACP MAD检测、BFD MAD检测、ARP MAD检测。
①LACP MAD检测配置
interface bridge-aggregation interface-number
//创建二层聚合接口和二层聚合组,并进入二层聚合端口视图
link-aggregation mode dynamic
//配置以上聚合组工作在动态聚合模式下
mad enable //在以上静态聚合组中启用LACP MAD检测功能
interface interface-type interface-number
port link-aggregation group number //将以上二层以太网端口加入到指定的聚合组
②BFD MAD检测
interface vlan-interface interface-number
mad bfd enable //在以上VLAN接口上启用BFD MAD检测功能
mad ip address ip-address {mask |mask-length} member member-id
//为指定成员设备的以上VLAN接口配置MAD IP地址
③ARP MAD检测
interface vlan-interface interface-number
ip address ip-address {mask |mask-length}
mad arp enable //在以上VLAN接口上启用ARP MAD检测功能
11.ARP配置
arp static ip-address mac-address [vlan-id interface-type interface-number] //手工添加静态ARP表项,相当于IP与MAC地址的静态绑定
arp timer aging aging-time //配置动态ARP表项的老化时间
arp check enable //开启ARP表项的检查功能
display arp [dynamic |static | ip-address ] //显示当前交换机上的ARP 表项
display arp [dynamic |staic] |{begin |include |exclude} regular-expression
//查看包含指定内容的ARP映射表
display arp count [[dynamic |static][|{begin |include |exclude} regular-expression ]| ip-address ]
//查看指定类型的ARP表项的数目
display arp count detection statistics interface interface-type interface-number
//查看指定端口被丢弃掉的不可信任的ARP报文的数量
display arp timer aging //查看动态ARP老化定时器的时间
reset arp [dynamic |static |interface interface-type interface-number] //消除ARP表项
interface vlan-interface vlan-id
arp max-learning-num number
//在VLAN接口视图下配置允许学习的动态ARP表项的最大数目
arp anti-attack valid-check enable //系统视图下开启对ARP报文源MAC地址一致性检查功能
#ARP入侵检测功能配置:
dhcp-snooping //全局开启交换机DHCP Snooping功能
ip source static import dot1x //全局开启基于802.1x认证用户的ARP入侵检测功能
interface interface-type interface-number
dhcp-snooping trust //配置DHCP Snooping的信任端口
arp detection trust //设置当前端口为ARP信任端口
vlan vlan-id//进入VLAN视图
arp detection enable //开启指定VLAN内所有端口的ARP入侵检测功能arp restricted-forwarding enable //在对应VLAN内开启ARP严格转发功能
#ARP报文限速功能配置:
interface interface-type interface-number
arp rate-limit enable //开启以上端口的ARP报文限速功能
arp rate-limit rate //配置允许通过的ARP报文的最大速率
arp protective-down recover enable //全局开启交换机上的端口状态自动恢复功能
arp protective-down recover interval interval
//全局设置端口状态由关闭恢复为开启的时间间隔
#ARP代理配置:
interface Vlan-interface vlan-id
arp proxy enable //开启普通代理ARP功能
local-proxy-arp enable [ip-range startIP to endIP ] //开启本地代理ARP功能
display arp proxy [interface vlan-interface vlan-id ]
//显示普通代理ARP和本地代理ARP的状态
12.集群配置
(1)NDP的启用及参数配置
ndp enable //启用NDP——用于收集邻接设备信息
ndp timer aging aging-in-seconds //指定接收设备应该保持本设备发送的NDP报文时间
ndp timer hello seconds //修改NDP信息的更新频率
(2)NTDP的启用及参数配置
ntdp enable //启用NTDP——用于收集邻接设备拓扑信息
ntdp hop hop-value//配置拓扑收集范围
ntdp timer hop-delay time//配置当前设备转发拓扑收集请求的跳数延迟时间ntdp timer port-delay time//配置当前设备转发拓扑收集请求的端口延迟时间ntdp timer interval-in-minutes //配置定时拓扑收集的时间间隔
ntdp explore //启动拓扑信息的收集过程
(3)集群启用及配置
cluster enable //启用集群功能
#手动配置集群参数:
cluster //进入集群视图
ip-pool administrator-ip-address {ip-mask | ip-mask-length } //配置集群IP 地址范围
build name //创建集群,并为集群命名
holdtime seconds //配置交换机的有效保留时间
timer interval //配置握手报文定时发送的时间间隔
#自动创建集群:
cluster //进入集群视图
ip-pool administrator-ip-address {ip-mask | ip-mask-length } //配置集群IP 地址范围
auto-build [recover] //自动将候选交换机加入集群成为成员交换机
(4)集群内外交互配置
cluster //进入集群视图
ftp-server ip-address //配置集群内部公用的FTP服务器
tftp-server ip-address //配置集群内部公用的TFTP服务器
logging-host ip-address//配置集群内部公用的日志主机
snmp-host ip-address//配置集群内部公用的网管主机
(5)集群管理配置
1)基本管理操作
cluster //进入集群视图
add-member [member-number] mac-address H-H-H [password password]
//加入指定的交换机作为集群成员交换机
administrator-address mac-address name name//配置管理交换机的MAC地址delete-member member-number//集群成员的删除
reboot member {member-number |mac-address H-H-H} [eraseflash] //重启指定的成员交换机
cluster switch-to {member-number |mac-address H-H-H |administrator}
//访问指定成员交换机
tracemac {by-mac mac-address vlan vlan-id |by-ip ip-address} [nondp]
//通过MAC地址或IP地址追踪设备
2)集群信息管理配置
display ndp [interface interface-list] //显示系统或指定端口的NDP配置信息display ntdp //显示全局NTDP信息
display ntdp device-list[verbose] //显示NTDP收集到的设信息列表
display cluster //显示集群状态和统计信息
display cluster candidates [mac-address H-H-H |verbose] //显示候选交换机信息display cluster members [member-number |verbose] //显示集群成员信息reset ndp statistics [interface interface-list] //清除NDP端口的统计信息
网络互连设备 1、交换机基本配置命令 (1)用户模式Switch> (2)特权模式Switch>enable Switch# (3)特权模式退回到用户模式:disable (4)下一级模式退回到上一级:exit (5)某个模式直接退回到特权模式:end (6)配置交换机名称命令hostname <交换机> (7)进入交换机端口模式命令 模式:switch(config)# 命令:interface <端口类型> <端口号> 交换机常见的端口类型:ethernet、fastethernet、gigabitethernet以及VLAN 接口等。端口号一般采用插槽号/端口号,如0/1。 (8)进入交换机的某个端口模式switch(config-if)# 显示交换机端口状态命令switch# show interface <端口类型> <端口号> (9)进入控制台线路模式模式:switch(config)# 命令:line console <编号> 参数:编号是配置口的编号,从0开始编号。结果:进入控制台模式 switch(config-line)#。 (10)配置控制台口令模式:switch(config-line)# 命令:password <密码> 参数:密码支持字母和数字。 启用密码认证模式:switch(config-line)# 命令:login (11)配置进入特权模式口令模式:switch(config)# 命令:enable password|secret <密码> 参数:password表示密码以明文形式存放,secret表示密码以密文形式存放。密码支持字母和数字。 (12)为之前设置的口令加密模式:switch(config)# 命令:service password-encryption 结果:将之前设置的所有口令加密。 (13)配置交换机的登录标语模式:switch(config)# 命令:banner motd %<标语>%参数:标语应该是警示性的文字,不识别中文。结果:下次进入某个需要输入密码的模式时将会显示该提示。 (14)禁止干扰信息模式:控制台模式命令:logging synchronous 结果:下次弹出日志信息时会强制回车。 2、交换机系统帮助命令 (1)显示系统信息命令Switch> show version (2)显示交换机当前配置命令show running-config (3)显示交换机已保存的配置命令show startup-config (4)保存现有配置命令copy running-configu startup-config (5)清除已保存的配置erase startup-config (6)了解在某模式下有哪些命令时,可以输入“?” (7)某个命令只记得一部分时,可以在记得的部分后输入“?”(无空格)(8)清楚某单词后可输入的命令时,可在此单词后输入“? ”(中间有空格)。(9)将命令补充完整。输入能唯一识别某个命令关键字的一部分后,可以按键盘上的TAB键可以将该关键字补充完整。
思科交换机-常用命令及配置 switch> 用户模式 1:进入特权模式enable switch> enable switch# 2:进入全局配置模式configure terminal switch> enable switch#configure terminal switch(conf)# 3:交换机命名hostname name 以cisco001 为例 switch> enable switch#c onfigure terminal switch(conf)#hostname cisco001 cisco001(conf)# 4:配置使能口令(未加密)enable password cisco 以cisco 为例switch> enable switch#configure terminal cisco001(conf)# enable password cisco 5:配置使能密码(加密)enable secret ciscolab 以cicsolab 为例switch> enable switch#configure terminal switch(conf)# enable secret ciscolab
6:设置虚拟局域网vlan 1 interface vlan 1 switch> enable switch#configure terminal switch(conf)# interface vlan 1 switch(conf)# ip address 192.168.1.1 255.255.255.0 配置交换机端口ip 和子网掩码 switch (conf-if)#no shut 激活端口 switch (conf-if)#exit switch (conf)#ip default-gateway 192.168.254 设置网关地址 7:进入交换机某一端口interface fastehernet 0/17 以17 端口为例 switch> enable switch#configure terminal switch(conf)# interface fastehernet 0/17 switch(conf-if)# 8:查看命令show switch> enable switch# show version 察看系统中的所有版本信息 show interface vlan 1 查看交换机有关ip 协议的配置信息 show running-configure 查看交换机当前起作用的配置信息 show interface fastethernet 0/1 察看交换机1 接口具体配置和统计信息 show mac-address-table 查看mac 地址表
H3C三层交换机配置命令 [Quidway]dis cur ;显示当前配置[Quidway]display current-configuration ;显示当前配置[Quidway]display interfaces ;显示接口信息[Quidway]display vlan all ;显示路由信息[Quidway]display version ;显示版本信息 [Quidway]super password ;修改特权用户密码 [Quidway]sysname ;交换机命名[Quidway]interface ethernet 0/1 ;进入接口视图 [Quidway]interface vlan x ;进入接口视图[Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址 [Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关 [Quidway]rip ;三层交换支持 [Quidway]local-user ftp 增加用户名 [Quidway]user-interface vty 0 4 ;进入虚拟终端 [S3026-ui-vty0-4]authentication-mode password ;设置口令模式 [S3026-ui-vty0-4]set authentication-mode password simple 222 ;设置口令 [S3026-ui-vty0-4]user privilege level 3 ;用户级别 [Quidway]interface ethernet 0/1 ;进入端口模式 [Quidway]int e0/1 ;进入端口模式 [Quidway-Ethernet0/1]duplex {half|full|auto} ;配置端口工作状态 [Quidway-Ethernet0/1]speed {10|100|auto} ;配置端口工作速率 [Quidway-Ethernet0/1]flow-control ;配置端口流控 [Quidway-Ethernet0/1]mdi {across|auto|normal} ;配置端
交换机配置命令 Prepared on 24 November 2020
配置命令 交换机之间用交叉线 1进入特权模式:Switch>enable 2配置模式 Switch#config 3配置主机名:Switch(config)#hostname S1 4.设置访问口令S1#configure terminal S1(config)#line console 0 S1(config-line)#password cisco S1(config-line)#login S1(config-line)#line vty 0 15 S1(config-line)#password cisco S1(config-line)#login S1(config-line)#exit 5.将使能加密口令设置为 class。 S1(config)#enable secret class S1(config)#配置默认网关 6.在虚拟接口vlan99设置交换机ip地址 S1(config)#interface vlan99 S1(config-if)# S1(config-if)#no shutdown S1(config-if)#exit 7.交换机 VLAN 分配端口 S1(config)#interface fa0/1 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 99 S1(config-if)#exit 8.给vlan命名 S1(config)#vlan 10 S1(config-vlan)#name Faculty/Staff .本征vlan即分配端口连接s1 使用中继vlan S1中继vlan S1(config)#interface FastEthernet 0/1 S1(config-if)#switchport mode trunk S1(config-if)#switchport trunk native vlan 99 9..设置交换机默认网关
思科交换机常用命令大全 1.1 用户模式与特权模式 用户模式:可以使用一些基本的查询命令 特权模式:可以对交换机进行相关的配置 进入特权模式命令:Switch>enable 退出特权模式命令:Switch#exit 启用命令查询:? 时间设置:Switch#clock set 时间(自选参数,参数必须符合交换机要求) 显示信息命令:Switch#show 可选参数 注意:可以用TAB键补齐命令,自选参数为用户自定义参数,可选参数为交换机设定参数 查看交换机配置: Switch#show running-config 保存交换机配置:Switch#copy running-config startup-config Switch#wr 查看端口信息:Switch#show interface 查看MAC地址表:Switch#show mac-address-table 查看交换机CPU的状态信息:Switch#show processes 1.2 全局配置模式 进入全局配置模式:Switch#configure terminal
主机名修改:Switch(config)#hostname 主机名(自选参数) 特权模式进入密码: Switch(config)#enable secret 密码(自选参数) 取消特权模式密码:Switch(config)#no enable secret 取消主机名设置: Switch(config)#no hostname 退出配置模式: Switch(config)#exit 需要特别注意的是在配置模式中无法使用show命令,如果要使用 的话show前必须加do和空格,例如:do show * 指定根交换机命令:Switch(config)#spanning-tree vlan 自选参数(VLAN号)root primary 例如: Switch(config)#spanning-tree vlan 1 root primary 需要注意的是:设置根交换机是基于VLAN的 关闭生成树协议命令:Switch(config)#no spanning-tree vlan 自选参数(VLAN 号) 例如: Switch(config)#no spanning-tree vlan 1 1.3 接口配置模式 进入接口配置模式:Switch(config)#interface 端口名称(可选参数) 启用端口:Switch(config-if)#no shutdown 停用端口:Switch(config-if)#shutdown 进入同种类型多端口配置:Switch(config)# interface range fastethernet 0/1-5 进入不同类型多端口配置:Switch(config)#interface range fastethernet 0/1-5,gigabitethernet 0/1-2
实验二交换机的配置方式及基本命令的熟悉 【实验目的】 通过对交换机设备的几种配置手段、配置模式和基本配置命令的认识,获得交换机的基本使用能力。 【实验任务】 1、认识交换机的的配置方式; 2、按照给出的参考拓扑图构建逻辑拓扑图; 3、按照给出的配置参数表配置各个设备; 4、练习交换机的一些基本命令。 【实验背景】 在前面的实验中我们已经接触了Cisco的路由器运行的Cisco互联网络操作系统(ISO,Internetwork Operating System),熟悉了Cisco ISO软件内置的命令行界面(CLI,command-line interface )。同样,交换机可以通过一个菜单驱动程序的界面,或者通过命令行界面〔CLI〕,或者在交换机配置了IP地址后通过Telnet远程登录、web登录的方式对交换机来进行配置。 交换机除了可以通过Console端口与计算机直接连接外还可以通过交换机的普通端口进行连接。如果是堆叠型的,也可以把几台交换机一起进行配置,因为实际上这个时候它们是一个整体,这时通过普通端口对交换机进行管理时,就不再使用超级终端了,而是以Telnet 虚拟终端或Web浏览器的方式实现与被管理交换机的通信。前提是在本地配置方式中已为交换机配置好了IP地址,我们可通过IP地址与交换机进行通信,不过要注意,只有是网管型的交换机才具有这种管理功能。实际上最常用的Catalyst交换机OS被称为Catalyst OS、Catos,其最大的特点是基于set命令。但我们常用的是与路由器的IOS相类似的基于IOS的Catalyst OS。下面简单介绍交换机的各种命今模式以及各种常用的命令。 表3.1 交换机的各种命令模式的访问方式、提示符、退出方法及其描述
三层交换机的图,如图所示: 一.交换机的配置: S2的配置命令: Enable Conf terminal Hostname S2 Switch(config)#vlan 10 Switch(config-vlan)#name stu10 Switch(config-vlan)#vlan 20 Switch(config-vlan)#name stu20 Switch(config)#interface f0/1 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config)#interface f0/2 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config)#inte f0/24 Switch(config-if)#switchport mode trunk
S3的配置命令: Enable Conf terminal Hostname S3 Switch(config)#vlan 10 Switch(config-vlan)#name stu10 Switch(config-vlan)#vlan 20 Switch(config-vlan)#name stu20 Switch(config)#interface f0/1 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config)#interface f0/2 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config)#inte f0/24 Switch(config-if)#switchport mode trunk 二.三层交换机的配置命令 Enable Conf terminal Switch(config)#vlan 10 Switch(config-vlan)#vlan 20 Switch(config)#interface f0/1 Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config)#interface f0/2 Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config)#interface vlan 10 Switch(config-if)#ip address 192.168.10.254 255.255.255.0 Switch(config-if)#no shutdown
1. 交换机支持的命令: 交换机基本状态: switch: ;ROM状态,路由器是rommon> hostname> ;用户模式 hostname# ;特权模式 hostname(config)# ;全局配置模式 hostname(config-if)# ;接口状态 交换机口令设置: switch>enable ;进入特权模式 switch#config terminal ;进入全局配置模式 switch(config)#hostname;设置交换机的主机名 switch(config)#enable secret xxx ;设置特权加密口令 switch(config)#enable password xxa ;设置特权非密口令 switch(config)#line console 0 ;进入控制台口 switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;允许登录 switch(config-line)#password xx ;设置登录口令xx switch#exit ;返回命令 交换机VLAN设置: switch#vlan database ;进入VLAN设置 switch(vlan)#vlan 2 ;建VLAN 2 switch(vlan)#no vlan 2 ;删vlan 2 switch(config)#int f0/1 ;进入端口1 switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为干线 switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继 switch(config)#vtp domain;设置发vtp域名 switch(config)#vtp password;设置发vtp密码 switch(config)#vtp mode server ;设置发vtp模式 switch(config)#vtp mode client ;设置发vtp模式 交换机设置IP地址: switch(config)#interface vlan 1 ;进入vlan 1 switch(config-if)#ip address;设置IP地址 switch(config)#ip default-gateway;设置默认网关 switch#dir flash: ;查看闪存 交换机显示命令: switch#write ;保存配置信息 switch#show vtp ;查看vtp配置信息 switch#show run ;查看当前配置信息 switch#show vlan ;查看vlan配置信息 switch#show interface ;查看端口信息 switch#show int f0/0 ;查看指定端口信息 2. 路由器支持的命令:
思科交换机路由器命令 大全 YUKI was compiled on the morning of December 16, 2020
1. 交换机支持的命令:交换机基本状态: 交换机口令设置: switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式 switch(config)#hostname ;设置交换机的主机名 switch(config)#enable secret xxx ;设置特权加密口 令switch(config)#enable password xxa ;设置特权非 密口令switch(config)#line console 0 ;进入控制台 口switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;允许登录 switch(config-line)#password xx ;设置登录口令 xxswitch#exit ;返回命令 交换机VLAN设置:
switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端 口1switch(config-if)#switchport access vlan 2 ; 当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为干线switch(config- if)#switchport trunk allowed vlan 1,2 ;设置允许 的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain ;设置发vtp域名switch(config)#vtp password ;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式 交换机设置IP地址: 交换机显示命令:
Enable //进入私有模式 Configure terminal //进入全局模式 service password-encryption //对密码进行加密 hostname Catalyst 3550-12T1 //给三层交换机定义名称 enable password 123456. //enable密码 Enable secret 654321 //enable的加密密码(应该是乱码而不是654321这样) Ip subnet-zero //允许使用全0子网(默认都是打开的) Ip name-server 172.16.8.1 172.16.8.2 //三层交换机名字Catalyst 3550-12T1对应的IP地址是172.16.8.1 Service dhcp //提供DHCP服务 ip routing //启用三层交换机上的路由模块 Exit Vtp mode server //定义VTP工作模式为sever模式 Vtp domain centervtp //定义VTP域的名称为centervtp Vlan 2 name vlan2 //定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002) Vlan 3 name vlan3 Vlan 4 name vlan4 Vlan 5 name vlan5 Vlan 6 name vlan6 Vlan 7 name vlan7 Vlan 8 name vlan8 Vlan 9 name vlan9 Exit interface Port-channel 1 //进入虚拟的以太通道组1 Interface gigabitethernet 0/1 //进入模块0上的吉比特以太口1 channel-group 1 mode on //把这个接口放到快速以太通道组1中 Interface gigabitethernet 0/2 //同上channel-group 1 mode on port-channel load-balance src-dst-ip //定义快速以太通道组的负载均衡方式(依靠源和目的IP的方式)
中兴交换机配置命令 ZTE交换机配置常用命令汇总(摘自网络) 个人心得:命令的使用要注意各种用户模式。 配成普通交换机:把2-24端口归到VLAN1下,2-24端口如果互相隔离,可以用PVLAN删除隔离端口即可。 2852s和2826s配置: 创建VLAN命令如下: set vlan 10 enable ///创建vlan set vlan 10 add port 1-24 untag ///在创建的vlan内添加用户端口 set vlan 10 add port 25 tag ///把级联端口添加到vlan10中,需打tag标签,即为trunk端口。 set port 1-24 pvid 10 ///把添加到vlan10的用户端口,pvid至vlan10中。交换机用户端口必须在所添加的vlan中做 此项命令。(默认的pvid为vlan10) 删除vlan命令如下: set vlan 10 delete port 1-24 ///删除用户端口 set vlan 10 delete port 25 ///删除级联端口 set vlan 10 disable ///删除vlan set port 1-24 pvid 1 ///恢复默认设置,该项命令必须添加,不然还会在show running-config信息中显示 set port 1-24 pvid 10的信息,会导致vlan用户使用不正常。 ENABLE密码配置: zte>enable //进入全局配置模式 password:***** //输入进入全局配置模式的密码,缺省没有密码 zte(cfg)#adminpass zxr10 //配置进入全局配置模式的密码为zxr10 TELNET 用户名密码配置(为了便于对设备的维护,有时需要修改登录用户名或密码,配置如下:) zte(cfg)#create user zxr10 //创建名为zxr10的用户 zte(cfg)#loginpass zxr10 //设置登录密码为zxr10 zte(cfg)#show user //显示telnet登录用户信息和当前用户名 配置三层管理或业务地址: config router ///进入config router模式 set ipport 0 ipaddress 10.20.20.1 255.255.255.0 ///设置三层接口ip地址及掩码 set ipport 0 vlan 10 ///三层端口绑定vlan set ipport 0 enable ///启用三层端口 iproute 0.0.0.0 0.0.0.0 10.20.20.1 ///设置默认路由指向网关 T40G和5228交换机配置: 批量创建vlan方式: zxr10#vlan database zxr10(vlan)#vlan 10-20
一、交换机基本配置 1、交换机命名: 在项目实施的时候,建议为处于不同位置的交换机命名,便于记忆,可提高后期管理效率。 switch(config)#hostname ruijie //ruijie为该交换机的名字 2、交换机配置管理密码: 配置密码可以提高交换机的安全性,另外,telnet登录交换机的时候,必须要求有telnet管理密码。 switch (config)#enable secret level 1 0 rg //配置telnet管理密码为rg,其中1表示telnet密码,0表示密码不加密 switch (config)#enable secret level 15 0 rg //配置特权模式下的管理密码rg,其中15表示为特权密码3、交换机配置管理IP switch (config)#interface vlan 1 //假设管理VLAN为VLAN 1 switch (config-if)#ip address 192.168.1.1 255.255.255.0 //给管理VLAN配置管理IP地址 switch (config-if)#no shutdown //激活管理IP,养成习惯,无论配置什么设备,都使用一下这个命令 4、交换机配置网关: switch(config)#ip default-gateway 192.168.1.254 //假设网关地址为192.168.1.254,此命令用户二层设备。通过以上几个命令的配置,设备便可以实现远程管理,在项目实施时(尤其是设备位置比较分散)特别能提高效率。 二、接口介质类型配置 锐捷为了降低SME客户的总体拥有成本,推出灵活选择的端口形式:电口和光口复用接口,方便用户根据网络环境选择对应的介质类型。 但光口和电口同时只能用其一,如图1,如使用了光口1F,则电口1不能使用。 1、接口介质类型的转换: Switch(config)#interface gigabitethernet 0/25-28
3COM SWITCH 4005 调试步骤 1.1连接 1.用一条console线将3COM SWITCH 4005 与终端连接,在windows 窗口中,单击开始选择程序-附件-通讯-超级终端,单击超级终端打开超级终端程序,选择连接端口(COM1,COM2)单击确定 在下面窗口选择还原为默认值按钮然后单击确定
进入超级终端窗口,Login:admin Password:(没有) 回车
2.1.创建VLAN 在Select menu option:输入bridge回车 在Select menu option (bridge):输入vlan回车 在Select menu option (bridge/vlan): 输入create回车 在Select VLAN ID (2-2047)[2]: 输入2 在Enter VLAN name [VLAN 2]: 输入tech(可根据需要起名字)] 重复以上步骤可创建多个VLAN 2.2.查看VLAN信息 在Select menu option (bridge/vlan): 输入summary 回车 在Select VLAN ID (1,2,all)[all]: 输入ALL回车 可以看到VLAN的摘要信息 2. 3在VLAN中添加端口 在Select menu option (bridge/vlan): 输入modify回车 在Select menu option (bridge/vlan/modify): 输入addport回车 在Select VLAN ID (1,2)[1]: 输入2回车 在Select slot (1-5): 输入1回车 在Select bridge port (1-8,all) [all]: 输入1回车 在Enter tag type (untagged,tagged): 输入untagged回车 注:如果此端口用于连接交换机或同属于两个以上的VLAN选择tagged,如此端口用于连接服务器及工作站且只属于一个VLAN(服务
Cisco交换机常用配置命令 CISCO交换机基本配置 switch>ena 進入特权模式 switch#erasenvram 全部清除交换机的所有配置 switch#reload 重新启动交换机(初始提示符为switch> ) ------------------------------------------------------------------------------------ CISCO交换机基本配置:Console端口连接 用户模式hostname>; 特权模式hostname(config)# ; 全局配置模式hostname(config-if)# ; 交换机口令设置: switch>enable ;进入特权模式 switch#config;进入全局配置模式 switch(config)#hostname cisco ;设置交换机的主机名 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 ;设置虚拟终端登录口令csico6 switch#write 保存配置設置 switch#copy running-config startup-config 保存配置設置,與write一樣switch#exit;返回命令 配置终端过一会时间就会由全局配置模式自动改为用户模式,将超时设置为永不超时 switch#conf t switch(config)#line con 0 switch(config-line)#exec-timeout 0 --------------------------------------------------------------------------------- 交换机显示命令: switch#write;保存配置信息 switch#showvtp;查看vtp配置信息 switch#show run ;查看当前配置信息 switch#showvlan;查看vlan配置信息 switch#showvlan name vlan2 switch#show interface ;查看端口信息
华为交换机基本配置命令 一、单交换机VLAN划分 命令命令解释 system 进入系统视图 system-view 进入系统视图 quit 退到系统视图 undo vlan 20 删除vlan 20 sysname 交换机命名 disp vlan 显示vlan vlan 20 创建vlan(也可进入vlan 20) port e1/0/1toe1/0/5 把端口1-5放入VLAN 20 中 5700系列 单个端口放入VLAN [Huawei]intg0/0/1 [Huawei]port link-typeaccess(注:接口类型access,hybrid、trunk) [Huawei]port default vlan 10 批量端口放入VLAN [Huawei]port-group 1 [Huawei-port-group-1]group-member ethernet G0/0/1 to ethernet G0/0/20 [Huawei-port-group-1]port hybrid untagged vlan 3 删除group(组)vlan 200内的15端口 [Huawei]intg0/0/15 [Huawei-GigabitEthernet0/0/15]undo port hybrid untagged vlan 200 通过group端口限速设置 [Huawei]Port-group 2 [Huawei]group-member g0/0/2 to g0/0/23 [Huawei]qos lr outbound cir 2000 cbs 20000 disp vlan 20 显示vlan里的端口20 int e1/0/24 进入端口24 undo port e1/0/10 表示删除当前VLAN端口10 disp curr 显示当前配置 return 返回 Save 保存 info-center source DS channel 0 log state off trap state off通过关闭日志信息命令改变DS模块来实现(关闭配置后的确认信息显示) info-center source DS channel 0 log state on trap state on 通过打开日志信息命令改变DS模块来实现(打开配置后的确认信息显示)
H3C交换机常用配置命令 一、用户配置
cisco交换机基本配置 1.Cisco IOS简介 Cisco Catalyst系列交换机所使用的操作系统是IOS(Internetwork Operating System,互联网际操作系统)或COS(Catalyst Operating System),其中以IOS使用最为广泛,该操作系统和路由器所使用的操作系统都基于相同的内核和shell。 IOS的优点在于命令体系比较易用。利用操作系统所提供的命令,可实现对交换机的配置和管理。Cisco IOS操作系统具有以下特点: (1)支持通过命令行(Command-Line Interface,简称CLI)或Web界面,来对交换机进行配置和管理。 (2)支持通过交换机的控制端口(Console)或Telnet会话来登录连接访问交换机。 (3)提供有用户模式(user level)和特权模式(privileged level)两种命令执行级别,并提供有全局配置、接口配置、子接口配置和vlan数据库配置等多种级别的配置模式,以允许用户对交换机的资源进行配置。 (4)在用户模式,仅能运行少数的命令,允许查看当前配置信息,但不能对交换机进行配置。特权模式允许运行提供的所有命令。 (5)IOS命令不区分大小写。 (6)在不引起混淆的情况下,支持命令简写。比如enable通常可简约表达为en。 (7)可随时使用?来获得命令行帮助,支持命令行编辑功能,并可将执行过的命令保存下来,供进行历史命令查询。 1.搭建交换机配置环境 在对交换机进行配置之前,首先应登录连接到交换机,这可通过交换机的控制端口(Console)连接或通过Telnet登录来实现。 (1)通过Console口连接交换机 对于首次配置交换机,必须采用该方式。对交换机设置管理IP地址后,就可采用Telnet登录方式来配置交换机。 对于可管理的交换机一般都提供有一个名为Console的控制台端口(或称配置口),该端口采用RJ-45接口,是一个符合EIA/TIA-232异步串行规范的配置口,通过该控制端口,可实现对交换机的本地配置。 交换机一般都随机配送了一根控制线,它的一端是RJ-45水晶头,用于连接交换机的控制台端口,另一端提供了DB-9(针)和DB-25(针)串行接口插头,用于连接PC机的COM1或COM2串行接口。Cisco的控制线两端均是RJ-45水晶头接口,但配送有RJ-45到DB-9和RJ-45到DB-25的转接头。 通过该控制线将交换机与PC机相连,并在PC上运行超级终端仿真程序,即可实现将PC机仿真成交换机的一个终端,从而实现对交换机的访问和配置。 Windows系统一般都默认安装了超级终端程序,对于Windows 2000 Server系统,该程序位于【开始】菜单下【程序】中【附件】的【通讯】群组下面,若没有,可利用控制面板中的【添加/删除程序】来安装。单击【通讯】群组下面的【超级终端】,即可启动超级终端。 首次启动超级终端时,会要求输入所在地区的电话区号,输入后将显示下图所示的连接创建对话框,在【名称】输入框中输入该连接的名称,并选择所使用的示意图标,然后单击确定按钮。 图9-2 超级终端连接创建对话框