命令行查询子网掩码所有用户网络信息?


简介:写写帮文库小编为你整理了多篇相关的《Brocade交换机常用命令专题》,但愿对你工作学习有帮助,当然你在写写帮文库还可以找到更多《Brocade交换机常用命令专题》。
Brocade交换机常用命令(下面命令是基于6.x版本的,有些老版本的交换机可能找不到相关命令)1、switchshow:可以查看交换机的名称、型号、状态、角色、domain ID、wwn、zone状态、zone配置名等。2、cfgshow:可以查看zone的相关信息、端口的alias等。3、新建一个zoning:alicreate “hostname”,“domainid,port”zonecreate “hostname_storage”,“aliname;aliname”cfgadd “CFGNAME”,“hostname_strage”cfgsavecfgenable “CFGNAME”4、licenseshow:查看当前交换机的license5、switchdisable:将当前交换机禁用,一般用于设置交换机配置时使用6、switchenable:启用当前交换机7、日常交换机检查命令:switchshow(交换机、端口状态)hashow(CP卡状态)slotshow(slot状态)psshow(电源状态)tempshow(温度状态)fanshow(风扇状态)firmwareshow(微码状态)licenseshow(license状态)cfgshow(zoning状态)uptime(交换机自上次重启到现在的时间)porterrshow(查看端口的错误信息)errshow(查看交换机的报错信息)8、zone相关命令:zonecreate:创建一个zonezoneobjectcopy:复制一个zone到一个新的zongzoneobjectrename:重新命名一个zonezoneobjectexpunge:删除一个zonecfgclear:删除所有zone信息cfgsize:查看zone数据库大小cfgtransshow:查看是否有未被保存的zone相关信息cfgtransabort:放弃未被保存的zone相关信息cfgactvshow:显示激活中的zone配置configupload:将交换机的配置信息保存到指定的FTP服务器上9、fabricshow:查看当前fabric中有哪些交换机10、nsshow:查看当前交换机中有哪些node(设备)11、nsallshow:查看当前fabric中有哪些node(设备)(完善中.......)最新回复skilljiang at 2009-8-10 11:25:45如何初始化一台brocade san 交换机:1、一根console线,一般购买交换机都会随机器有一根。2、通过console线,使用笔记本的超级终端连接交换机3、交换机默认IP:10.77.77.77;netmask:255.255.255.0如果是director:10.77.77.77(logical switch 0),10.77.77.76(logical switch1),*.75(cp0),*.74(cp1)4、设置密码:应该有factory, root, admin, user四种,不设置的话,可以用ctrl+c取消,一般管理员使用admin账号5、设置IP地址:ipaddrset设置IP地址,gateway,用ipaddrshow查看设置是否准确6、设置时间:默认情况是北美时间,使用date设置时间,也可以用tsclockserver命令和NTP 服务器同步7、设置时区:如果是北京时,那就是用tstimezone +8进行设置,注意要下次重启后才生效。8、添加license:如果你没买license,默认情况会自带web license,zoing license,fabric license。如果你买了其他license,如extend license,那就需要使用licenseadd来添加,licenseshow可以查看当前有哪些许可。9、设置timeout:如timeout 10,就是设置了10分钟的timeout,设置完在下次登录后生效。10、设置交换机名:使用switchname来进行设置,建议switchname不要有重复。11、设置交换机Domain ID:先将switch禁用,使用switchdisable,在使用configure命令设置domain id,设置完成后使用switchenable启用交换机,注意domain id在一个fabric中是唯一的,不能有冲突,否则会造成fabric segement。12、创建zone配置:首先创建alias,建议用主机名+port或者主机名+wwn来设置,使用alicreate命令然后创建zones,使用zonecreate来创建,用cfgcreate来创建zone配置文件,使用cfgshow来查看zone信息。思科交换机配置命令总结1.switch(config)# hostname hostname 在基于CLI的交换机上设置主机名/系统名: switch(enable)set system name name-string 2.在基于IOS的交换机上设置登录口令: switch(config)# enable password level 1 password 在基于CLI的交换机上设置登录口令: switch(enable)set password switch(enable)set enalbepass 3.在基于IOS的交换机上设置远程访问: switch(config)# interface vlan 1 switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address 在基于CLI的交换机上设置远程访问: switch(enable)set interface sc0 ip-address netmask broadcast-address switch(enable)set interface sc0 vlan switch(enable)set ip route default gateway 4.在基于IOS的交换机上启用和浏览CDP信息: switch(config-if)# cdp enable switch(config-if)# no cdp enable 为了查看Cisco邻接设备的CDP通告信息: switch# show cdp interface [type modle/port] switch# show cdp neighbors [type module/port] [detail] 在基于CLI的交换机上启用和浏览CDP信息: switch(enable)set cdp {enable|disable} module/port 为了查看Cisco邻接设备的CDP通告信息: switch(enable)show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 5.基于IOS的交换机的端口描述: switch(config-if)# description description-string 基于CLI的交换机的端口描述: switch(enable)set port name module/number description-string 6.在基于IOS的交换机上设置端口速度: switch(config-if)# speed{10|100|auto} 在基于CLI的交换机上设置端口速度: switch(enable)set port speed moudle/number {10|100|auto} switch(enable)set port speed moudle/number {4|16|auto} 7.在基于IOS的交换机上设置以太网的链路模式: switch(config-if)# duplex {auto|full|half} 在基于CLI的交换机上设置以太网的链路模式: switch(enable)set port duplex module/number {full|half} 8.在基于IOS的交换机上配置静态VLAN: switch# vlan database switch(vlan)# vlan vlan-num name vla switch(vlan)# exit switch# configure teriminal switch(config)# interface interface module/number switch(config-if)# switchport mode access switch(config-if)# switchport access vlan vlan-num switch(config-if)# end 在基于CLI的交换机上配置静态VLAN: switch(enable)set vlan vlan-num [name name] switch(enable)set vlan vlan-num mod-num/port-list 9.在基于IOS的交换机上配置VLAN中继线: switch(config)# interface interface mod/port switch(config-if)# switchport mode trunk switch(config-if)# switchport trunk encapsulation {isl|dotlq} switch(config-if)# switchport trunk allowed vlan remove vlan-list switch(config-if)# switchport trunk allowed vlan add vlan-list 在基于CLI的交换机上配置VLAN中继线: switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate] 10.在基于IOS的交换机上配置VTP管理域: switch# vlan database switch(vlan)# vtp domain domain-name 在基于CLI的交换机上配置VTP管理域: switch(enable)set vtp [domain domain-name] 11.在基于IOS的交换机上配置VTP 模式: switch# vlan database switch(vlan)# vtp domain domain-name switch(vlan)# vtp {sever|cilent|transparent} switch(vlan)# vtp password password 在基于CLI的交换机上配置VTP 模式: switch(enable)set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password] 12.在基于IOS的交换机上配置VTP版本: switch# vlan database switch(vlan)# vtp v2-mode 在基于CLI的交换机上配置VTP版本: switch(enable)set vtp v2 enable 13.在基于IOS的交换机上启动VTP剪裁: switch# vlan database switch(vlan)# vtp pruning 在基于CL I 的交换机上启动VTP剪裁: switch(enable)set vtp pruning enable 14.在基于IOS的交换机上配置以太信道: switch(config-if)# port group group-number [distribution {source|destination}] 在基于CLI的交换机上配置以太信道: switch(enable)set port channel moudle/port-range mode{on|off|desirable|auto} 15.在基于IOS的交换机上调整根路径成本: switch(config-if)# spanning-tree [vlan vlan-list] cost cost 在基于CLI的交换机上调整根路径成本: switch(enable)set spantree portcost moudle/port cost switch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list] 16.在基于IOS的交换机上调整端口ID: switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority 在基于CLI的交换机上调整端口ID: switch(enable)set spantree portpri {mldule/port}priority switch(enable)set spantree portvlanpri {module/port}priority [vlans] 17.在基于IOS的交换机上修改STP时钟: switch(config)# spanning-tree [vlan vlan-list] hello-time seconds switch(config)# spanning-tree [vlan vlan-list] forward-time seconds ` switch(config)# spanning-tree [vlan vlan-list] max-age seconds 在基于CLI的交换机上修改STP时钟: switch(enable)set spantree hello interval[vlan] switch(enable)set spantree fwddelay delay [vlan] switch(enable)set spantree maxage agingtiame[vlan] 18.在基于IOS的交换机端口上启用或禁用Port Fast 特征: switch(config-if)#spanning-tree portfast 在基于CLI的交换机端口上启用或禁用Port Fast 特征: switch(enable)set spantree portfast {module/port}{enable|disable} 19.在基于IOS的交换机端口上启用或禁用UplinkFast 特征: switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second] 在基于CLI的交换机端口上启用或禁用UplinkFast 特征: switch(enable)set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on] 20.为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name 21.为了从一条中继链路上删除VLAN,可使用下列命令: switch(enable)clear trunk module/port vlan-range 22.用show vtp domain 显示管理域的VTP参数.23.用show vtp statistics显示管理域的VTP参数.24.在Catalyst交换机上定义TrBRF的命令如下: switch(enable)set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}] 25.在Catalyst交换机上定义TrCRF的命令如下: switch(enable)set vlan vlan-num [name name] type trcrf {ring hex-ring-num|decring decimal-ring-num} parent vlan-num 26.在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口: switch(enable)set vlan vlan-num mod-num/port-num 27.命令show spantree显示一个交换机端口的STP状态.28.配置一个ELAN的LES和BUS,可以使用下列命令: ATM(config)# interface atm number.subint multioint ATM(config-subif)# lane serber-bus ethernet elan-name 29.配置LECS: ATM(config)# lane database database-name ATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-address ATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-address ATM(lane-config-databade)# name …30.创建完数据库后,必须在主接口上启动LECS.命令如下: ATM(config)# interface atm number ATM(config-if)# lane config database database-name ATM(config-if)# lane config auto-config-atm-address 31.将每个LEC配置到一个不同的ATM子接口上.命令如下: ATM(config)# interface atm number.subint multipoint ATM(config)# lane client ethernet vlan-num elan-num 32.用show lane server 显示LES的状态.33.用show lane bus显示bus的状态.34.用show lane database显示LECS数据库可内容.35.用show lane client显示LEC的状态.36.用show module显示已安装的模块列表.37.用物理接口建立与VLAN的连接: router# configure terminal router(config)# interface media module/port router(config-if)# description description-string router(config-if)# ip address ip-addr subnet-mask router(config-if)# no shutdown 38.用中继链路来建立与VLAN的连接: router(config)# interface module/port.subinterface router(config-ig)# encapsulation[isl|dotlq] vlan-number router(config-if)# ip address ip-address subnet-mask 39.用LANE 来建立与VLAN的连接: router(config)# interface atm module/port router(config-if)# no ip address router(config-if)# atm pvc 1 0 5 qsaal router(config-if)# atm pvc 2 0 16 ilni router(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-mask router(config-if)# lane client ethernet elan-num router(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-name router(config-if)# lane client ethernet elan-name router(config-if)# …40.为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行: router(config)# ip routing router(config)# router ip-routing-protocol router(config-router)# network ip-network-number router(config-router)# network ip-network-number 41.配置默认路由: switch(enable)set ip route default gateway 42.为一个路由处理器分配VLANID,可在接口模式下使用下列命令: router(config)# interface interface number router(config-if)# mls rp vlan-id vlan-id-num 43.在路由处理器启用MLSP: router(config)# mls rp ip 44.为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中: router(config)# interface interface number router(config-if)# mls rp vtp-domain domain-name 45.查看指定的VTP域的信息: router# show mls rp vtp-domain vtp domain name 46.要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令: router(config-if)#mls rp management-interface 47.要检验MLS-RP的配置情况: router# show mls rp 48.检验特定接口上的MLS配置:router# show mls rp interface interface number 49.为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表: set mls flow [destination|destination-source|full] 50.为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令: router(config)# mls rp ip input-acl [page] 51.当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令: switch(enable)set mls enable 52.若想改变老化时间的值,可在特权模式下输入以下命令: switch(enable)set mls agingtime agingtime 53.设置快速老化:switch(enable)set mls agingtime fast fastagingtime pkt_threshold 54.确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定: switch(enable)show mls include 55.显示MLS高速缓存记录: switch(enable)show mls entry 56.用命令show in arp显示ARP高速缓存区的内容。57.要把路由器配置为HSRP备份组的成员,可以在接口配置模式下使用下面的命令: router(config-if)# standby group-number ip ip-address 58.为了使一个路由器重新恢复转发路由器的角色,在接口配置模式下: router(config-if)# standy group-number preempt 59.访问时间和保持时间参数是可配置的:router(config-if)# standy group-number timers hellotime holdtime 60.配置HSRP跟踪:router(config-if)# standy group-number track type-number interface-priority 61.要显示HSRP路由器的状态:router# show standby type-number group brief 62.用命令show ip igmp确定当选的查询器。63.启动IP组播路由选择:router(config)# ip muticast-routing 64.启动接口上的PIM:dalllasr1>(config-if)# ip pim {dense-mode|sparse-mode|sparse-dense-mode} 65.启动稀疏-稠密模式下的PIM: router# ip multicast-routing router# interface type number router# ip pim sparse-dense-mode 66.核实PIM的配置:dallasr1># show ip pim interface[type number] [count] 67.显示PIM邻居:dallasr1># show ip neighbor type number 68.为了配置RP的地址,命令如下:dallasr1># ip pim rp-address ip-address [group-access-list-number][override] 69.选择一个默认的RP: dallasr1># ip pim rp-address 通告RP和它所服务的组范围:dallasr1># ip pim send-rp-announce type number scope ttl group-list access-list-number 为管理范围组通告RP的地址:dallasr1># ip pim send-rp-announce ethernet0 scope 16 group-list1 dallasr1># access-list 1 permit 266.0.0.0 0.255.255.255 设定一个RP映像代理:dallasr1># ip pim send-rp-discovery scope ttl 核实组到RP的映像:dallasr1># show ip pim rp mapping dallasr1># show ip pim rp [group-name|group-address] [mapping] 70.在路由器接口上用命令ip multicast ttl-threshold ttl-value设定TTL阀值: dallasr1>(config-if)# ip multicast ttl-threshold ttl-value 71.用show ip pim neighbor显示PIM邻居表。72.显示组播通信路由表中的各条记录:dallasr1>show ip mroute [group-name|group-address][scoure][summary][count][active kbps] 73.要记录一个路由器接受和发送的全部IP组播包:dallasr1> #debug ip mpacket [detail] [access-list][group] 74.要在CISCO路由器上配置CGMP: dallasr1>(config-if)# ip cgmp 75.配置一个组播路由器,使之加入某一个特定的组播组: dallasr1>(config-if)# ip igmp join-group group-address 76.关闭 CGMP:dallasr1>(config-if)# no ip cgmp 77.启动交换机上的CGMP:dallasr1>(enable)set cgmp enable 78.核实Catalyst交换机上CGMP的配置情况: catalystla1>(enable)show config set prompt catalystla1> set interface sc0 192.168.1.1 255.255.255.0 set cgmp enable 79.CGMP离开的设置:Dallas_SW(enable)set cgmp leave 80.在Cisco设备上修改控制端口密码: R1(config)# line console 0 R1(config-line)# login R1(config-line)# password Lisbon R1(config)# enable password Lilbao R1(config)# login local R1(config)# username student password cisco 81.在Cisco设备上设置控制台及vty端口的会话超时: R1(config)# line console 0 R1(config-line)# exec-timeout 5 10 R1(config)# line vty 0 4 R1(config-line)# exec-timeout 5 2 82.在Cisco设备上设定特权级:R1(config)# privilege configure level 3 username R1(config)# privilege configure level 3 copy run start R1(config)# privilege configure level 3 ping R1(config)# privilege configure level 3 show run R1(config)# enable secret level 3 cisco 83.使用命令privilege 可定义在该特权级下使用的命令: router(config)# privilege mode level level command 84.设定用户特权级:router(config)# enable secret level 3 dallas router(config)# enable secret san-fran router(config)# username student password cisco 85.标志设置与显示:R1(config)# banner motd ‘unauthorized access will be prosecuted!’
86.设置vty访问:R1(config)# access-list 1 permit 192.168.2.5 R1(config)# line vty 0 4 R1(config)# access-class 1 in 87.配置HTTP访问:Router3(config)# access-list 1 permit 192.168.10.7 Router3(config)# ip http sever Router3(config)# ip http access-class 1 Router3(config)# ip http authentication local Router3(config)# username student password cisco 88.要启用HTTP访问,请键入以下命令: switch(config)# ip http sever 89.在基于set命令的交换机上用setCL1启动和核实端口安全:switch(enable)set port security mod_num/port_num…enable mac address
switch(enable)show port mod_num/port_num 在基于CiscoIOS命令的交换机上启动和核实端口安全:switch(config-if)# port secure [mac-mac-count maximum-MAC-count] switch# show mac-address-table security [type module/port] 90.用命令access-list在标准通信量过滤表中创建一条记录:Router(config)# access-list access-list-number {permit|deny} source-address [source-address] 91.用命令access-list在扩展通信量过滤表中创建一条记录: Router(config)# access-list access-list-number {permit|deny{protocol|protocol-keyword}}{source source-wildcard|any}{destination destination-wildcard|any}[protocol-specific options][log] 92.对于带内路由更新,配置路由更新的最基本的命令格式是:R1(config-router)#distribute-list access-list-number|name in [type number] 93.对于带外路由更新,配置路由更新的最基本的命令格式是:R1(config-router)#distribute-list access-list-number|name out [interface-name] routing-process
autonomous-system-number 94.set snmp命令选项:set snmp community {read-only|ready-write|read-write-all}[community_string] 95.set snmp trap 命令格式如下: set snmp trap {enable|disable} [all|moudle|classis|bridge|repeater
auth|vtp|ippermit|vmps|config|entity|stpx] set snmp trap rvcr_addr rcvr_community 96.启用SNMP chassis 陷阱: Console>(enable)set snmp trap enable chassis 97.启用所有SNMP chassis 陷阱: Console>(enable)set snmp trap enable 98.禁用SNMP chassis 陷阱: Console>(enable)set snmp trap disable chassis 99.给SNMP陷阱接收表加一条记录:Console>(enable)set snmp trap 192.122.173.42 public 100.show snmp 输出结果。101.命令set snmp rmon enable 的输出结果。102.显示SPAN信息: Consile> show span华为交换机基础命令总结V1.3目录【01基础常识篇】--1一、华为3COM IOS与CISCO IOS的区别--------------------------1二、命令行提供的视图---------------------2 【02常用基础命令】------------------------------3 【03华为路由器DISPLAY命令大全】--------5 【04设置交换机的密码】------------------------5 【05设置远程登录交换机】--------------------5 【06 VLAN基本配置命令(以Quidway S3026为例)】-------------------8【01基础常识篇】#一、华为3COM IOS与CISCO IOS的区别以前华为公司的产品配置指令和CISCO公司的一样,但由于版权与官司的问题,华为3COM公司于2002年到2003年期间进行了IOS的升级工作,升级后的IOS与CISCO公司有很大区别。主要表现在以下三个方面。1、全新IOS支持中文界面:在新版IOS中用户可以选择英文或中文界面,这样对于那些英文水平不高或不习惯看英文的用户来说可以切换到中文界面,各项命令的注解一目了然。对中文的支持显示了华为3COM公司本土化作战的目标。2、安全级别的提高:我们先来回顾一下CISCO公司的安全级别,CISCO路由器通过模式分配权限,cisco IOS软件将EXEC会话分为用户(USER)模式和特权(privileged)模式,另外很多配置命令还需要进入到配置模式下进行。通过ENABLE进入特权模式,通过configure terminal进入配置模式。华为3COM公司的IOS安全级别是基于用户的而不是基于模式的。也就是说我们可以为一台路由器配置很多个用户,不同的用户分配不同的权限,要想进入路由器必须输入正确的用户名和密码才可以。这一点有点类似于WINDOWS操作系统,当登录系统后要想进入桌面必须输入正确的用户名和密码。对用户进行权限划分比划分模式更安全,更方便管理。3、配置命令的全面变化: 由于涉及到版权的问题,华为公司在此次升级IOS后对所有的配置命令也进行了很大程度的变动。可以说现在的指令和以前的指令有天壤之别,与CISCO公司的配置命令而是相去甚远,经常配置CISCO路由器的用户初次接触华为3COM路由器会很不适应。新旧命令变化如图所示:思科----华为常用的命令4.华为3COM的VRP版本与CISCO的IOSCISCO设备中是通过升级IOS版本来解决某些问题,而在华为3COM设备中取消了IOS版本这个定义,取而代之的是VRP版本。其实和IOS版本是一样的,只是叫法不同而已。二、命令行提供的视图1.用户视图 2.系统视图 3.用户界面视图 4.VLAN视图5.以太网端口视图【用户视图】 查看交换机的简单运行状态和统计信息
与交换机建立连接即进入 quit断开与交换机连接【系统视图】查看交换机的全部运行状态和统计信息,进行文件管理和系统管理 配置系统参数 [Quidway] 在用户视图下键入system-view quit返回用户视图 return返回用户视图【以太网端口视图】 配置以太网端口参数 [Quidway-Ethernet0/1] 固定以太网端口视图:在系统视图下键入interface ethernet0/1[Quidway-Ethernet1/1] 扩展百兆以太网端口视图:在系统视图下键入interface ethernet 1/1【VLAN视图】 配置VLAN参数 [Quidway-vlan1] 在系统视图下键入vlan 1【用户界面视图】 配置用户界面参数 [Sysname-ui-vty0] 在系统视图下键入user-interface vty 0【02常用基础命令】# [Quidway]sysname huawei//命名交换机(或路由器)[Quidway]super password yucedu
//修改特权模式口令 【举例:】super 0 用户特权为0 级, 可以使用与此相等或更低级别命令 说明: 0-访问级, 1-监控级, 2-系统级, 3-管理级
用户从访问级别到管理级别需要输入密码 super 3
Password: 用户特权为3 级, 可以使用与此相等或更低级别命令 说明: 0-访问级, 1-监控级, 2-系统级, 3-管理级[Quidway]interface ethernet 0/1//进入接口视图 [Quidway-Ethernet0/1]shutdown//关闭端口 [Quidway-Ethernet0/1]undo shutdown
//重启端口[Quidway]quit//退出系统视图(一层一层退出)[Quidway]return//直接退到用户视图[Quidway]undo ……//删除命令language-mode ?//切换语言模式chinese
Chinese environmentenglish
English environment配置本地telnet用户,用户名为”lyt”,密码为”123456”,权限为最高级别3(缺省为级别1)[huawei]local-user lyt [huawei-luser-lyt]password simple 123456 [huawei-luser-lyt]service-type telnet level 3查看IOS的命令如下: display boot-loader下次启动使用的app文件: flash:/S2403H-0019-140.bin删除saved-config文件的命令如下: reset ?acl清除ACL信息arpARP模块counters接口统计信息dot1x指定802.1x配置信息garp通用属性注册协议igmp-snooping清除IGMP侦听统计信息ipIP模块local-server本地服务器信息logbuffer清除日志缓冲区ndp邻居发现协议radius指定RADIUS配置信息recycle-bin清除回收站文件saved-configuration保存的配置stop-accounting-buffer查询备份在本地的无响应的停止计费报文stp生成树协议trapbuffer清除告警缓冲区reset saved-configuration交换机的 flash memory 中的配置将被擦除.你确信吗?[Y/N]n 【03华为路由器DISPLAY命令大全】# display current-configuration//显示当前配置信息display saved-configuration//显示启动时的配置文件display interfaces//显示接口状态及配置信息display local-user//显示路由器当前所有的用户信息display version//显示系统的软件硬件状态信息,及当前的IOS版本信息display clock//显示系统时钟当前时间设置display sysname//显示系统名称,主机名display history-command//显示键入过的命令历史列表。display arp//显示路由器的ARP地址映射对应表display boot-loader//显示系统IOS文件【04设置交换机的密码】[huawei]super password ?cipher
Display password with cipher textlevelSpecify the entering password of the specified prioritysimple
Display password with plain text[huawei]super password le [huawei]super password level ?INTEGER
Priority level[huawei]super password level 3 ?cipher
Display password with cipher textsimple
Display password with plain text[huawei]super password level 3 si [huawei]super password level 3 simple ?STRING
Plain text password string[huawei]super password level 3 simple yucedu 【05设置远程登录】【方式1:使用设置password模式登入交换机】 [huawei]user-interface vty 0 4 [huawei-ui-vty0-4]authentication-mode ?none无需认证直接登录password
利用用户终端接口的口令认证scheme利用RADIUS方案进行认证[huawei-ui-vty0-4]authentication-mode password//设置验证方式为密码验证[huawei-ui-vty0-4]set authentication password simple yucedu//设置登入验证的password密码为yucedu [huawei-ui-vty0-4]user privilege level 1//配置登入用户级别(缺省为级别1)【设置交换机管理IP地址】 [huawei]interface vlan 1[huawei-Vlan-interface1]ip add 192.168.1.240 255.255.255.0 [huawei-Vlan-interface1]undo shutdown【查看vlan 1接口的状态】 [huawei]display interface vlan 1
Vlan-interface1 current state : UPLine protocol current state : UP IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc23-79ae Internet Address is 192.168.1.240/24 Primary Description : HUAWEI, Quidway Series, Vlan-interface1 Interface
The Maximum Transmit Unit is 1500【交换机上提示,用户的登入和退出】 [huawei] %Jan
4 15:20:12 2002 huawei SHELL/5/LOGIN:Slot=1;VTY login from 192.168.1.239 %Jan
4 15:20:43 2002 huawei SHELL/5/LOGOUT:Slot=1;VTY logout from 192.168.1.239【客户端登入操作如下】【方式2:使用本地用户名密码方式登入交换机】 [huawei]user-interface vty 0 4 [huawei-ui-vty0-4]authentication-mode ?none无需认证直接登录password
利用用户终端接口的口令认证scheme利用RADIUS方案进行认证[huawei-ui-vty0-4]authentication-mode scheme注意: 必须添加Exec(Telnet)用户,否则操作员无法登录系统!【配置本地TELNET用户】 [huawei]local-user lyt [huawei-luser-lyt]password simple 123456 [huawei-luser-lyt]service-type telnet level 3【交换机上提示,用户的登入和退出】 [huawei] %2002/1/1 19:54:43 huawei SHELL/5/LOGIN:Slot=1;lyt 从 192.168.1.239 登录【06 VLAN基本配置命令(以Quidway S3026为例)】#[Quidway]vlan 3 创建并进入VLAN配置模式,缺省时系统将所有端口加入VLAN 1,这个端口既不能被创建也不能被删除[Quidway]undo vlan 3 删除一个VLAN[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 给VLAN增加/删除以太网接口[Quidway-Ethernet0/2]port access vlan 3 将本接口加入到指定VLAN id[Quidway-Ethernet0/2]port link-type {access|trunk|hybrid} 设置端口工作方式,access(缺省)不支持802.1q帧的传送,而trunk支持(用于Switch间互连),hybrid和trunk的区别在于trunk只允许缺省VLAN的报文发送时不打标签,而hybrid允许多个VLAN报文发送时不打标签。[Quidway-Ethernet0/2]port trunk permit vlan {id|all} 设置trunk端口通过指定VLAN的数据帧,trunk端口默认仅允许通过VLAN 1的数据帧。[Quidway-Ethernet0/2]port trunk pvid vlan 3 设置trunk端口的PVID,如果trunk端口上收到了非802.1q帧时,Switch会给该帧加上802.1q标志,该标志字段中的VLAN ID即PVID。备注:黑体为需要输入的命令,/表示多项选一。本总结只是命令的简答总结,不包括命令的使用环境等。在机器型号方面3548和3500属于同一操作系统。一般来讲3500系列的配置要先进入各个视图然后在各个视图下配置,而6500需要在全局模式下配置。注意各种命令的选项和内容组成。交换机命令:3548命令总结:基础命令:1.进入全局配置模式: config t2.设置主机名: hostname(添加主机名字)3.配置超级用户命令:enbale secret 5(加密口令)4.配置远程登录口令:line vty 0 4Password
7(加密口令)Password
0(明码口令)5.配置管理地址:interface VLAN1Ip address(ip 地址)(子网掩码)端口配置命令:1、进入端口配置模式:interface(端口号)2、配置端口配置信息:discription(对端口的描述)3、端口的开启和关闭:shutdownno shutdown4、配置端口的通信方式:duplex(auto /full/half)----(自动 全双工 半双工)5、配置端口的传输速率:speed(以Kbps为单位注意换算!)若为自动则使用命令 speed autoVLAN配置模式命令:1、配置vtp 域名: vtp domain(域名)2、配置vtp 模式:vtp mode(sever/client/transparent)3、进入VLAN 模式:vlan data4、建立VLAN :vlan(vlan ID)name(vlan name)5、删除VLAN :no vlan(vlan ID)6、为端口分配VLAN :先进入 端口模式然后输入: switchport access vlan(vlan ID)7、VLAN trunk 配置:先进入端口模式然后输入 switchport mode trunk8、封装vlan 协议:switchport trunk encapsulation(dot1q/isl/negotiate)9、设置允许中继的VLAN:switchport
trunk allowed valn(vlan ID)STP配置命令:1、打开或者关闭STP:spanning-tree vlan(vlan ID)no spanning-tree vlan(vlan ID)2、配置根网桥:spanning-tree vlan(vlan ID)root
primary 设置备份root :spanning-tree vlan(vlan ID)root secondary3、配置生成树的优先级: spanning-tree vlan(vlan ID)priority(0-61440)4、配置BackboneFast生成树可选功能:spanning-tree backbonefast5、配置UplinkFast生成树可选功能:spanning-tree uplinkfast spanning-tree uplinkfast max-update-rate(0-32000)6、配置portfast 功能:spanning-tree portfast default7、配置BPDU Filter可选功能 :spanning-tree portfast bpdufilterdefault 6500命令总结:基础命令:1、进入超级用户配置模式:enable2、设置主机名:set system name(添加主机名字)3、配置超级用户命令:set enablepass(旧密码)(新密码)(新密码)4、配置远程登录口令:set password(旧密码)(新密码)(新密码)5、配置管理地址:set interface sc0(ip 地址)(子网掩码)(广播地址)端口配置命令:6、配置端口配置信息:set port name’(mod/port)(name)7、端口的开启和关闭:set port enable(mod/port)set port disable(mod/port)8、配置端口的通信方式:set port duplex(mod/port)(auto/full/half)----(自动 全双工 半双工)9、配置端口的传输速率:set port speed(mod/port)(port-speed)---以Kbps为单位若为自动则使用命令set port speed(mod/port)auto set speed to
dutoVLAN配置模式命令:10、配置vtp 域名:set
vtp domain(域名)11、配置vtp 模式:setvtp mode(sever/client/transparent)12、建立VLAN :set
vlan(vlan ID)name(vlan name)13、删除VLAN :clear
vlan(vlan ID)14、为端口分配VLAN :set vlan(vlan ID)(mod/port)VLAN trunk 配置:set
trunk(mod/port)(mode)(type)15、设置允许中继的VLAN:set trunk(mod/port)vlan(vlanID)STP配置命令:5、打开或者关闭STP:set spantree
enable(vlan ID)6、配置根网桥:set spantree
root(vlan ID)设置备份root :set spantree
root
secondary(vlan ID)7、配置生成树的优先级: set spantree
priority(0-61440)8、配置BackboneFast生成树可选功能:set spantree
backbonefast enable9、配置UplinkFast生成树可选功能:set spantree
uplinkfast enableset spantree
uplinkfast
enable(单位是 packet/ms)10、配置portfast 功能:set spantree
portfast(mod/port)(enable/default/disable)11、配置BPDU Filter可选功能 :set spantree
portfast
bpdu-filter(enable/disable)set spantree
portfast
bpdu-filter(mod/port)(enbale/disable/default)路由器命令1、进入全局模式:configure terminal2、几个公用命令:退出命令:exit
保存配置:wirte memory(保存到路由器的NVRAM)write network tftp(保存到TFTP服务器)删除配置: Write erase 网络检测命令:telnet
ping
trace
show(这几个命令应该重点了解下他们的作用和使用方法)3、端口配置:进入:interface(端口)4、端口带宽:bandwidth(单位为Kbps)5、开关端口:shutdown
no shutdown6、配置接口地址:ip address(ip地址)(子网掩码)7、配置POS接口:先进入接口模式Crc 32(可选的crc校验位是16
或32)Pos farming sdh(可选的帧格式是 sdh和 sonet)Pos flag s1 s0 2(s1 s0 =00 表示sonet帧的数据 S1 s0=10(十进制的2)表示是SDH的帧数据)8、loopback接口配置:int loopback 0ip address(ip 地址)(子网掩码)no ip route-cacheno ip mroute-cache9、配置静态路由:ip rpute(目的网络地址)(子网掩码)(下一跳路由器地址)10、配置RIP动态协议:router ripNetwork(网络地址)--记住只写上网络地址即可。配置被动接口:passive-interface(端口)配置路由过滤:access-list 12 deny anyRouter ripDistribute-list 12 in(端口)配置管理距离:distance 50定义邻居路由:neighbor(邻居路由IP地址)11、配置ospf动态协议:router ospf(进程号)Network(网络地址)(反掩码)area(区域号)或者 network area(区域号)range(网络地址)(子网掩码)配置ospf引入外部路由的花费:redistribute metric(metric值0-16777214)配置引入外部路由时缺省的标记值:redistribute tag(32位的数值)配置引入外部路由时的缺省外部路由类型:redistribute 错哦nnected metric-type(1或 2)subnetsDHCP的配置:1、配置DHCP pool名字并进入DHCP pool 配置模式:Ip dhcp pool(地址池名字)2、配置IP地址池的子网地址和地址掩码:network(network号码)(子网掩码/掩码长度)3、配置不用于动态分配的ip地址:ip dhcp excluded-address(低地址高地址)4、配置IP地址池的缺省网关:default-router(最多允许8个)5、配置IP地址池的域名:domain-name(名字)6、配置IP地址池的域名服务器的IP地址:dns-sever(最多8个)7、配置IP地址的租约时间:lease(日 小时 分/infinte)IP访问控制列表的配置:1、配置标准访问控制列表:access-list(列表号)(permit/deny)(源IP地址)(子网掩码)2、配置扩展访问列表:access-list(列表号)(permit/deny)(协议)(源地址)(子网掩码)(目的地址)(子网掩码)(lt/gt/eq/neq)(端口号)3、使用ip access-list 命令:ip access-lis(extended/standard)(列表号)(Pemit/deny)(协议)(源地址+子网掩码)(目的地址+子网掩码)(lt/gt/eq/neq)(端口号)4、用名字表示访问控制列表的配置方法:与3大体相同,只是将列表号换成字符与数字组成的名字。5、将访问控制列表应用于端口:interface(端口号)Ip access-group(控制列号)(in/out)1、为交换机分配ip 输入分配给交换机的IP地址为*.*.*.*,掩码为255.255.255.0,类型为System 命令:system-viewInterface vlan-interface 1Undo ip addressIp address 172.28.1.33 255.255.255.02、定义vlan 101(name caiwu),vlan 102(name diaodu),名字,端口命令:vlan 101Interface vlan-interface 101Ip address 192.168.1.1 255.255.255.0Port e1/0/1 to e1/0/24Vlan 102Interface vlan-interface 102Ip address 192.168.2.1 255.255.255.0Port e1/0/25 to e1/0/473、定义vlan的接口地址。4、在两个vlan之间增加路由。命令:ip route-static 0.0.0.0 255.255.255.255 192.168.1.2545、为交换机添加默认网关。将以太网端口Ethernet1/0/1设置为Trunk端口。 system-view System View: return to User View with Ctrl+Z.[H3C] interface ethernet 1/0/1 [H3C-Ethernet1/0/1] port link-type trunkip
address
172.16.21.1
255.255.255.0可能这样配的话意思是VLAn130的IP就是172.16.21.2—172.16.21.254
而172.16.21.1则是这个网段的网关。将Trunk端口Ethernet1/0/1加入到VLAN2、VLAN4、VLAN50~VLAN 100中。 system-view System View: return to User View with Ctrl+Z.[H3C] interface ethernet 1/0/1 [H3C-Ethernet1/0/1] port link-type trunk [H3C-Ethernet1/0/1] port trunk permit vlan 2 4 50 to 100
Please wait...Done.取消某个trunk端口的命令 undo port link-type远程登录方式: 配置web用户[h3c] local-user admin(配置用户名admin)---本地用户admin [h3c] service-type telnet level 3(设置级别为3)----服务类型telnet 级别3 [h3c] password simple admin(设置密码为admin)----密码简单型admin配置telnet用户[h3c] user-interface vty 0 4(进入虚拟终端)----用户接口 vty 0 4 [h3c] authentication-mode scheme(配置本地或远端用户名认证方式—鉴定)----鉴定模式scheme(鉴定)[h3c] user privilege level 3(配置登录用户的级别3)---用户特权级别3 [h3c] local-user huawei(配置用户名huawei)---本地用户huawei [h3c] service-type telnet level 3(设置级别为3)----服务类型telnet级别3 [h3c] password simple admin(设置密码admin)----密码简单型adminUser-interface vty 0 4 Authentication-mode scheme User privilege level 3 Local-user huawei Service-type telnet level 3 Password simple admin华为交换机配置用户名和密码2009-09-18 02:16 华为交换机配置用户名和密码(1)telnet只需输入password即可远程登陆交换机。进入用户界面视图[SwitchA]user-interface vty 0 4 设置认证方式为密码验证方式 [SwitchA-ui-vty0-4]authentication-mode password设置登陆验证的password为明文密码”huawei”[SwitchA-ui-vty0-4]set authentication password simple huawei 配置登陆用户的级别为最高级别3(缺省为级别1)[SwitchA-ui-vty0-4]user privilege level 3/1 [switchA]super password simple ddddd(2)telnet需要输入username和password才可以登陆交换机。进入用户界面视图[SwitchA]user-interface vty 0 4配置本地或远端用户名和口令认证[SwitchA-ui-vty0-4]authentication-mode scheme配置本地TELNET用户,用户名为”huawei”,密码为”huawei”,权限为最高级别3(缺省为级别1)[SwitchA]local-user huawei [SwitchA-user-huawei]password simple huawei [SwitchA-user-huawei]service-type telnet level 3(3)通过con口只需输入password即可远程登陆交换机。进入用户界面视图[Quidway]user-interface aux 0设置认证方式为密码验证方式[Quidway-ui-aux0] authentication-mode password设置登陆验证的password为明文密码”huawei”[Quidway-ui-aux0] set authentication password simple huawei 配置登陆用户的级别为最高级别3(缺省为级别1)[Quidway-ui-aux0] user privilege level 3(4)通过con口需要输入username和password才可以登陆交换机。[Quidway]user-interface aux 0配置本地或远端用户名和口令认证[Quidway-ui-aux0] authentication-mode scheme配置本地TELNET用户,用户名为”huawei”,密码为”huawei”,权限为最高级别3(缺省为级别1)[SwitchA]local-user huawei [SwitchA-user-huawei]password simple huawei [SwitchA-user-huawei]service-type telnet level 3display arp int g6/1/4Type: S-Static D-Dynamic IP AddressMAC Address
VLAN ID Port NameAging Type 10.2.209.4001d-0f80-68f1 200GigabitEthernet6/1/4N/A S 192.168.0.70050-c21e-f941 900GigabitEthernet6/1/4 D 192.168.0.60050-c21f-1a0b 900GigabitEthernet6/1/4 D 192.168.0.80050-c21f-19fc 900GigabitEthernet6/1/4 D 10.2.213.107
0025-1185-8bb8 700GigabitEthernet6/1/4 D 10.2.209.251
0023-cd22-f263 210GigabitEthernet6/1/4 D 10.2.209.123
001e-e576-9c9f 200GigabitEthernet6/1/4 D 10.2.209.122
0015-e907-98c7 200GigabitEthernet6/1/4 D 10.2.208.132
0023-893e-2b94 10GigabitEthernet6/1/4[DC-HX-S9508-WW-01]int g6/1/4[DC-HX-S9508-WW-01-GigabitEthernet6/1/4]display this
# interface GigabitEthernet6/1/4 description connect to DC-JR-S3600-WW-0401_g1/1/3[DC-JR-S3600-WW-0401]display mac-address vlan 200 MAC ADDRVLAN ID STATEPORT INDEXAGING TIME(s)0000-5e00-0114 200LearnedGigabitEthernet1/1/3
AGING 0015-587f-185c 200LearnedGigabitEthernet1/1/3
AGING 0015-e907-98c7 200LearnedEthernet2/0/44AGING 0016-177e-b336 200LearnedGigabitEthernet1/1/3
AGING 0016-d332-81a9 200LearnedGigabitEthernet1/1/3
AGING 0016-d336-b3ce 200LearnedGigabitEthernet1/1/3
AGING 0019-21bd-99a3 200LearnedGigabitEthernet1/1/3
AGING 001a-a039-fa46 200LearnedGigabitEthernet1/1/3
AGING 001d-0934-4f2f 200LearnedGigabitEthernet1/1/3
AGING 001d-0f80-68f1 200LearnedEthernet2/0/41AGING 001d-7280-2303 200LearnedGigabitEthernet1/1/3
AGING 001e-e576-9c9f 200LearnedEthernet2/0/43AGING 0023-8938-c0e8 200LearnedGigabitEthernet1/1/3
AGING 0023-8938-c178 200LearnedGigabitEthernet1/1/3
AGING 0023-8948-c220 200LearnedEthernet1/0/6AGING 0026-b981-d498 200LearnedGigabitEthernet1/1/3
AGING 0027-1962-e5ab 200LearnedGigabitEthernet1/1/3
AGING配置举例及步骤:仅允许来自10.10.1.66和lO.10.1.78的TELNET用户访问交换机:#定义基本访问控制列表。[Quidway]acl number 2008 match-order config [Quidway-acl—basic-2008]rule 1 permit source lO.1O.1.66 O [Quidway—acl-basic-2008]rule 2 permit source 1O.1O.1.78 O [Quidway-acl-basic-2008]quit #引用访问控制列表。[Quidway]user-interface vty 0 4 [Quidway-user-interface-vty0-4]acl 2OO8 inboundH3C交换机恢复出厂设置reset saved-configuration The saved configuration will be erased.Are you sure?[Y/N]y /提示是否擦除配置文件/ Configuration in the device is being cleared.Please wait......Configuration in the device is cleared.rebootThis command will reboot the system.Since the current configuration may have b een changed, all changes may be lost if you continue.Continue? [Y/N] Y /提示是否重启设备,按Y将重新启动/
【提示】1、可以只键入reset sa,reset sa是reset saved-configuration的缩写。2、擦除配置文件后,必须要重启设备后才能恢复到出厂设置。修改交换机的系统时间clock datetime hh:mm:ss mm/dd/yy11、访问控制列表
基于接口的ACL 1000-1999基本的ACL 2000-2999acl number acl-num [match-order {config|auto}]rule [rule-id] {permit|deny} [source sour-add sour-wildcard|any] [time-range time-name] [logging] [fragment] [vpn-instance vpn-instance-name]高级的ACL 3000-3999acl number acl-num [match-order {config|auto}]rule [rule-id] {permit|deny} protocol [source sour-add sour-wildcard|any] [destination dest-add dest-wildcard|any] [source-port operator port1[port2]][dest-portoperatorport1[port2]][icmp-type{icmp-type icmp-code|icmp-message}] [precedence pre] [time-range time-name] [logging] [fragment] [vpn-instance vpn-instance-name]基于MAC地址ACL 4000-4999ACL访问控制列表公司企业网通过Switch的端口实现各部门之间的互连。研发部门由GigabitEthernet1/1/1接入交换机,工资查询服务器的地址为192.168.1.2。要求正确配置ACL,禁止研发部门在工作日8:00至18:00访问工资服务器。配置步骤(1)定义时间段# 定义8:00至18:00的周期时间段。 system-view[H3C] time-range test 8:00 to 18:00 working-day(2)定义到工资服务器的ACL # 进入ACL3000视图。[H3C] acl number 3000# 定义其它部门到工资服务器的访问规则。[H3C-acl-adv-3000] rule 1 deny ip destination 192.168.1.2 0 time-range test [H3C-acl-adv-3000] quit(3)在端口上应用ACL # 在端口上应用ACL 3000。[H3C] interface gigabitethernet1/1/1[H3C-GigabitEthernet1/1/1] packet-filter inbound ip-group 3000IP-MAC绑定方法:[switch-Ethernet1/0/24]am user-bind mac-addr AAAA-AAAA-AAAA ip-addr 192.168.x.x
IP MAC switch-Ethernet1/0/24]arp static 192.168.1.1 AAAA-AAAA-AAAA 2 [switchA]undo arp 192.168.1.1解除绑定

我要回帖

更多关于 查询子网掩码 的文章

 

随机推荐