1、noundoeaclexitquitwritesaveshow versiondisp versioneraseresetshow rundisp current-configurationshow tech-supportdisp base-informationshow startdisp saved-configurationrouter ospfospfrouter bgpbgprouter ripriphostnamesysnameuserlocal-usersimple7ciphermodelink-typemultihybrid注意:1.disp是display的缩写,在没有歧义
2、时LANSWITCH会自动识别不完整词2.disp cur显示LANSWITCH当前生效的配置参数3.disp和ping命令在任何视图下都可执行,不必切换到系统视图4.删除某条命令,一般的命令是undo xxx,另一种情况是用其他的参数代替现在的参数,如有时虽然xxx abc无法使用undo删除,但是可以修改为xxx def1.2LANSWITCH配置注意事项表1-2 LANSWITCH配置注意事项序号注意项目记录1登录交换机时请注意在超级终端中流控选择“无”2启动时按”ctrl+B”可以进入到boot menu模式3当交换机提示”Please Press ENTER”,敲完回车后请等待一下,
3、设备需要一定的时间才能进入到命令行界面(具体的时间试产品而定)4进入系统视图请输入”system-view”(输入”sys”即可)5对使用的端口、vlan、interface vlan进行详细的描述6如果配置了telnet用户,一定要设置权限或配置super密码除了S6500系列,模块不可以带电插拔8使用别的产品模块前请确认该模块是否可以混用9配置acl时请注意掩码配置是否准确10二层交换机配置管理IP后,请确保管理vlan包含了管理报文到达的端口11配置完毕后请在用户视图下(即尖括号视图下)采用save命令保存配置12请确保在设备保存配置的时候不掉电,否则可能会导致配置丢失13如果要清除所有
4、配置,请在用户视图下(即尖括号视图下)采用reset saved-configuration,并重启交换机注:其他配置需注意的地方请参考每部分内容后面的注明。1.3远程telnet登录1.3.1功能需求及组网说明 图1-1 telnet配置说明:如图,交换机SwitchA通过以太网口ethernet 0/1和SwitchB的ethernet0/24实现互连。PC的IP地址为10.10.10.10/24,SwitchA的管理IP配置在vlan100的虚接口上,10.10.10.1/24,使用vlan 10与SwitchB进行互连,地址为192.168.0.1/24,SwitchB也使用vlan
5、100作为管理vlan,地址为192.168.0.2/24需求:SwitchA只能允许10.10.10.0/24网段的地址的PC telnet访问SwitchB允许其它任意网段的地址telnet访问1.3.2配置 表1-3 telnet配置配置过程注释SwitchA交换机配置:SwitchAvlan 100SwitchA-vlan100 port Ethernet 0/10 to Ethernet 0/20SwitchAinterface Vlan-interface 100SwitchA-Vlan-interface100ip address 10.10.10.1 255.255.255.0
6、SwitchAvlan 10SwitchA-vlan10 port Ethernet 0/1SwitchAinterface Vlan-interface 10SwitchA-Vlan-interface10ip address 192.168.0.1 255.255.255.0SwitchAuser-interface vty 0 4SwitchA-ui-vty0-4SwitchA-ui-vty0-4authentication-mode passwordSwitchA-ui-vty0-4set authentication password simple HuaweiSwitchA-ui-
7、vty0-4userprivilege level 3SwitchA-ui-vty0-4acl 1 inboundSwitchAacl number 1SwitchA-acl-basic-1SwitchA-acl-basic-1rule permit source 10.10.10.0 0.0.0.255SwitchB交换机配置:SwitchA-vlan100 port Ethernet 0/24SwitchBinterface Vlan-interface 100SwitchB-Vlan-interface100ip address 192.168.0.2 255.255.255.0Swit
8、chBuser-interface vty 0 4SwitchB-ui-vty0-4SwitchB-ui-vty0-4authentication-mode passwordSwitchB-ui-vty0-4set authentication password simple HuaweiSwitchB-ui-vty0-4userSwitchBip route-static0.0.0.0 0.0.0.0 192.168.0.1#配置管理vlan 100#配置与SwitchB互连的vlan 10#设置telnet登录为密码验证方式。telnet登录缺省为密码验证方式#如果配置telnet登录为密
9、码验证方式或使用缺省验证方式,必须配置登录密码,如果不配置密码,系统不允许登录。#系统默认VTY登录方式用户级别为0,设置为3才能进入系统视图#设置只允许10.10.10.0网段地址能够访问交换机SwitchA#允许其它任意网段的地址能够访问交换机需要启动路由协议或者加一条静态默认路由一共只可以设置5个telnet用户缺省情况下telnet用户的权限是0级,如果没有配置telnet用户的权限,并且也没有配置super密码,则telnet用户只能对交换机执行有限的操作,无法配置交换机1.4远程AUX口登录1.4.1图1-2 通过AUX口远程登录交换机需求:通过AUX口(即console口)登录到
10、交换机进行配置1.4.2表1-4 通过AUX口远程登录配置Quidway user-interface aux 0Quidway-ui-aux0modem#在交换机上执行user-interface aux 0进入console#键入modem进入modem状态。#与计算机相连的modem为modemA,与交换机相连的modem为modemB。物理连接后在计算机上启用超级终端, com端口选择和modemA相连的com口在超级终端屏幕上键入命令 atdt 82882285(与交换机modemB的电话号码)等待片刻就可以登录到交换机上。目前的命令行配置的交换机console口和aux口是合二为一
11、的连接交换机和modem要采用专用的aux线缆modem要设置成自动应答方式1.5打开debug开关1.5.1 图1-3 Debug 系统调试如图,PC1与交换机A的Console 口或以太口相连。如果是通过以太口相连,要求PC1的IP地址和该以太端口所在的VLAN Interface在同一网段。在这里,我们假设PC1的地址是10.110.53.247/21, 交换机的以太网口所在VLAN Interface 1的IP 地址是10.110.53.248/21。1.5.2 表1-5 打开debug开关debbuging?allAll debugging functionsarpARP modul
12、ebgpBGP modulecluster Cluster moduledeviceDevice managedhcp-relay DHCP relay moduledot1xSpecify 802.1x configuration informationethernetEthernet modulefibFIB moduleftp-server FTP server informationgarp GARP modulegmrp GMRP modulegvrp GVRP modulehabp HABP modulehgmpserver HGMP server moduleigmp IGMP
13、moduleipIP modulelocal-server Local authentication server informationmac-address MAC address table informationmodemModem modulemulticast Multicast modulendpNDP moduleniNI module: NI Debuging informationntdp NTDP modulentp-serviceNTP moduleospf OSPF modulepimPIM moduleradiusRadius moduleripRIP module
14、rmon RMON debugging switchsnmp-agent SNMP modulestpSTP infomationtcpTCP moduletelnetTELNET moduleudpUDP modulevfsFilesystem modulevrrp VRRP modulevtpVTP modulevtyVTY moduledebugging ip packetterminal monitor% Current terminal monitor is onterminal debugging% Current terminal debugging is on#在用户视图下面打
15、开调试开关,选择所需要进行调试的模块参数。#打开IP报文调试开关#在用户视图模式下打开屏幕输出开关。在用户视图模式下打开调试输出开关。调试结束后,用undo debugging XXX, undo terminal monitor 和 undo terminal debugging 关闭所有的调试开关。缺省情况下debug信息只向console口终端输成信息,如果是telnet到交换机,则需要在系统视图下执行info-center monitor channel 0命令,否则debug信息无法向telnet终端输出。1.6SNMP配置1.6.1图1-4 SNMP配置网管工作站(NMS)与以太网
16、交换机通过以太网相连,网管工作站IP地址为129.102.149.23,以太网交换机的VLAN接口IP地址为129.102.0.1。在交换机上进行如下配置:设置团体名和访问权限、管理员标识、联系方法以及交换机的位置信息、允许交换机发送Trap消息。1.6.2表1-6 SNMP配置system-viewQuidway snmp-agent community read publicQuidway snmp-agent community write privateQuidwaysnmp-agent sys-info contact Mr.Wang-Tel:3306Quidway snmp-age
17、nt sys-info location telephone-closet,3rd-floorQuidway snmp-agent trap enableQuidway snmp-agent target-host trap address udp-domain 129.102.149.23 udp-port 5000 params securityname public# 进入系统视图# 设置团体名和访问权限# 设置管理员标识、联系方法以及物理位置# 允许向网管工作站129.102.149.23发送Trap报文,使用的团体名为public。一般情况下只需设置团体名和访问权限设备即可被管理,其
18、他为可选配置1.7WEB网管配置1.7.1图1-5 WEB网管配置PCA连接在交换机A的端口0/1PCA使用WEB网管软件对交换机进行WEB管理1.7.2表1-7 WEB网管配置在System命令模式下进行下面配置Quidwaysnmp-agent sys-info version v3Quidwaysnmp-agent mib-view included wnmview internetQuidwaysnmp-agent group v3 wnmgroup authenticationread-view wnmview write-view wnmview notify-view wnmvi
19、ewQuidwaysnmp-agent usm-user v3 wnm wnmgroupauthentication-mode md5 123456Quidwaysnmp-agent target-host trap address udp-domain 192.168.1.3 params securityname wnm v2cQuidwaysnmp-agent trap enable standardQuidwaysnmp-agent trap enable vrrpQuidwaysnmp-agent trap enable bgp#启动Snmp Agent的V3版本#创建一个范围为internet的Snmp视图#创建一个需要进行认证的Snmp V3的组wnmgroup,读写和接受Trap的视图都使用wnmview#创建一个Snmp V3的用户,用户名是wnm,认证密码是123456,采用MD5方式认证,不进行加密#设置Trap主机地址为192.168.1.3,接收Trap的用户名为wnm,采用TrapV2c格式送Trap#激活标准Trap,VRRP和BGP的Trap完成上述配置以后,在PC机打
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1