H3C三层交换机配置命令
- 格式:doc
- 大小:28.50 KB
- 文档页数:3
H3C三层交换机配置命令技术教程2010-03-01 16:16:53 阅读655 评论0 字号:大中小订阅一、write是cisco的H3C的保存配置的命令是save查看保存的配置文件为dis save 查看当前运行的配置是dis cu清空配置为reset save 需要重启生效重启为reboot二、system-view:进入配置模式[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 ;用户级别说明:必须要配置虚拟终端用户名、密码等相关信息,否则将无法通过RJ-45端口telnet到交换机。
H3C三层交换机配置命令H3C三层交换机配置命令H3C认证培训体系充分考虑客户不同层次的需求,致力于为全球客户提供全面、专业、权威的网络技术认证培训。
下面是店铺整理的关于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} ;配置端口平接扭接[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} ;设置端口工作模式[Quidway-Ethernet0/1]port access vlan 3 ;当前端口加入到VLAN[Quidway-Ethernet0/2]port trunk permit vlan {ID|All} ;设trunk允许的`VLAN[Quidway-Ethernet0/3]port trunk pvid vlan 3 ;设置trunk端口的PVID[Quidway-Ethernet0/1]undo shutdown ;激活端口[Quidway-Ethernet0/1]shutdown ;关闭端口[Quidway-Ethernet0/1]quit ;返回[Quidway]vlan 3 ;创建VLAN[Quidway-vlan3]port ethernet 0/1 ;在VLAN中增加端口[Quidway-vlan3]port e0/1 ;简写方式[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 ;在VLAN 中增加端口[Quidway-vlan3]port e0/1 to e0/4 ;简写方式[Quidway]monitor-port ;指定镜像端口[Quidway]port mirror ;指定被镜像端口[Quidway]port mirror int_list observing-port int_type int_num ;指定镜像和被镜像[Quidway]description string ;指定VLAN描述字符[Quidway]description ;删除VLAN描述字符[Quidway]display vlan [vlan_id] ;查看VLAN设置[Quidway]stp {enable|disable} ;设置生成树,默认关闭[Quidway]stp priority 4096 ;设置交换机的优先级[Quidway]stp root {primary|secondary} ;设置为根或根的备份[Quidway-Ethernet0/1]stp cost 200 ;设置交换机端口的花费[Quidway]link-aggregation e0/1 to e0/4 ingress|both ; 端口的聚合[Quidway]undo link-aggregation e0/1|all ; 始端口为通道号[SwitchA-vlanx]isolate-user-vlan enable ;设置主vlan[SwitchA]isolate-user-vlan secondary ;设置主vlan包括的子vlan[Quidway-Ethernet0/2]port hybrid pvid vlan ;设置vlan的pvid [Quidway-Ethernet0/2]port hybrid pvid ;删除vlan的pvid[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged ;设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。
举例讲解H3C配置三层交换机4个步骤详细用法H3C是一家网络设备制造商,其三层交换机是其主要产品之一、配置H3C三层交换机可以提供强大的网络管理和控制功能。
下面将详细介绍配置H3C三层交换机的四个步骤及其用法。
第一步:基本设置在配置H3C三层交换机之前,首先需要进行基本设置,包括设置设备的管理IP地址、主机名、密码等。
以下是一个基本设置的例子:1.登录到H3C三层交换机的控制台,输入用户名和密码。
2. 进入系统视图,通过命令"system-view"进入。
3. 设置设备的主机名,使用命令"sysname [主机名]"进行设置。
例如,"sysname switch1"将设备主机名设置为switch14. 设置设备的管理IP地址,使用命令"interface vlan-interface [vlan号]"进入VLAN接口模式。
然后使用命令"ip address [IP地址] [子网掩码]"设置IP地址。
例如,"interface vlan-interface 1"进入VLAN接口1模式,"ip address 192.168.1.1 255.255.255.0"设置IP地址为192.168.1.1,子网掩码为255.255.255.0。
5. 保存配置,使用命令"save"保存配置。
第二步:VLAN配置VLAN是虚拟局域网的缩写,通过配置VLAN可以将交换机的端口分成不同的虚拟网络,从而实现更好的网络管理和控制。
以下是一个VLAN配置的例子:1. 创建VLAN,使用命令"vlan [vlan号]"进行创建。
例如,"vlan 10"将创建一个VLAN编号为10的VLAN。
2. 将端口加入VLAN,使用命令"port vlan [vlan号] [端口号]"进行配置。
1.1 公共配置命令1.1.1 display time-range【命令】display time-range{ time-name| all}【视图】任意视图【参数】time-name:时间段的名称,为1~32个字符的字符串,不区分大小写,必须以英文字母a~z或A~Z开头。
为避免混淆,时间段的名字不可以使用英文单词all。
all:所有配置的时间段。
【描述】display time-range命令用来显示时间段的配置和状态,对于当前处在激活状态的时间段将显示Active,对于非激活状态的时间段将显示Inactive。
【举例】# 显示时间段trname的配置和状态。
<Sysname> display time-range trnameCurrent time is 22:20:18 1/5/2006 ThursdayTime-range : trname ( Inactive )from 15:00 1/28/2006 to 15:00 1/28/2008表1-1 display time-range命令显示信息描述表1.1.2 time-range【命令】time-range time-name{ start-time to end-time days[ from time1 date1] [ to time2 date2 ] | from time1 date1 [ to time2 date2 ] | to time2 date2 }undo time-range time-name [ start-time to end-time days [ from time1 date1 ] [ to time2 date2 ]| from time1 date1 [ to time2 date2 ] | to time2 date2 ]【视图】系统视图【参数】time-name:时间段的名称,为1~32个字符的字符串,不区分大小写,必须以英文字母a~z或A~Z开头。
H3C三层交换机和路由器的配置流程举例讲解H3C配置三层交换机4个步骤详细用法,配置三层交换机通用的四个步骤就是:划分VLAN,并描述;给VLAN划网关;给VLAN指定端口;配置路由协议;学会这几个步骤之后就能解决所有的配置三层交换机的问题。
<H3C>language-modechinese//切换到中文模式<H3C>system-view//进入系统视图[H3C]displaycurrent-configuration//显示当前配置三层交换机//以下开始配置三层交换机配置三层交换机第一步:划分VLAN,并描述vlan1descriptionlocal-s3600//本交换机使用#vlan2descriptionlink-to-shanxicentre//陕西省中心#vlan3descriptionlink-to-shangjiecentre//商界分中心内部使用#vlan4descriptionlink-to-shangdongsuo//商东所#vlan5descriptionlink-to-shangnansuo//商南所配置三层交换机第二步:给VLAN划网关#interfaceVlan-interface2descriptionlinktoshanxicentreipaddress10.61.242.110255.255.255.252//省中心指定广域网关、子网掩码#interfaceVlan-interface3descriptionlinktoshangjiecentreipaddress10.161.134.65255.255.255.192//商界分中心局域网关、子网掩码#interfaceVlan-interface4descriptionlinktoshangdongsuoipaddress10.61.242.113255.255.255.252//商东所广域网关、子网掩码#interfaceVlan-interface5descriptionlinktoshangnansuoipaddress10.61.242.117255.255.255.252//商南所广域网关、子网掩码配置三层交换机第三步:给VLAN指定端口#interfaceEthernet1/0/2//将交换机的端口2指定给省中心使用descriptionlinktoshanxicentreportaccessvlan2#interfaceEthernet1/0/15-24//将交换机的端口15-24指定给分中心内部使用descriptionlinktoshangjiecentreportaccessvlan3#interfaceEthernet1/0/3//将交换机的端口3指定给商东所使用descriptionlinktoshangdongsuoportaccessvlan4#interfaceEthernet1/0/4//将交换机的端口4指定给商南所使用descriptionlinktoshangnansuoportaccessvlan5配置三层交换机第四步:配置路由协议//配静态路由(只用对远端设备配一条路由即可,本地自通)iproute0.0.0.00.0.0.010.61.242.109//指定所有网段到商东所的路由//配置三层交换机商东所的反向路由iproute10.161.134.0255.255.255.010.61.242.114iproute10.161.135.0255.255.255.010.61.242.114//配置三层交换机商南所的反向路由iproute10.161.135.0255.255.255.010.61.242.118iproute10.161.136.0255.255.255.010.61.242.118//省中心配置三层交换机:iproute10.61.242.0255.255.255.010.61.242.110//商东所242.114和商南所242.118共属的242.0指向分中心网关iproute10.161.134.0255.255.255.010.61.242.110//分中心内部网段指向分中心网关//iproute10.161.134.0255.255.255.010.61.242.110//iproute10.161.135.0255.255.255.010.61.242.110//iproute10.161.136.0255.255.255.010.61.242.110//以下开始配置路由器syslocal-user admin创建账号adminpassword simple chuntent创建密码chuntentauthorization-attribute level 3 账号权限service-type telnet打开telnet服务service-type web打开页面登陆服务telnet server enable 启用服务ip http enable 启用服务quitsysuser-interface vty 0 4authentication-mode schemequitinterface g0/0 进入外网接口配置外网ip和子网掩码ip address X.X.X.X 255.255.255.X这里地址按照您的公网ip地址和掩码填写nat outboundquitinterface vlan 1 进入内网接口配置内网ip和子网掩码ip address X.X.X.X 255.255.255.Xquitip route-static 0.0.0.0 0.0.0.0 X.X.X.X这里填写外网网关地址。
For personal use only in study and research;1.恢复到出厂设置->2.连接Trunk端口,设置Vlan1(管理Vlan)的IP地址,确保交换机互联互通->3.开启所有交换机的Telnet服务->4.从下至上依次配置Vlan,在三层交换机上配置Vlan接口地址(本Vlan的网关)->5.在三层交换机上配置服务器Vlan->6.在三层交换机上配置到汇聚层交换机的端口。
---------------------------------------------------------------------------------------一、初始化Reset save //删除保存配置Reboot //重启二、交换机之间实现互联互通登录3100,输入如下命令:System-viewInterface vlan-interface 1 //进入默认的VLAN端口,vlan 1Ip address 192.168.1.4 24 //设置本机在VLAN 1 中的IP 地址Quitsave登录5100,输入如下命令:System-viewInterface vlan-interface 1Ip address 192.168.1.2 24Quitsave登录5600,输入如下命令:System-viewInterface vlan-interface 1Ip address 192.168.1.1 24Quitsave在3100上输入:Ping 192.168.1.1Ping 192.168.1.2同理在5100上也输入:Ping 192.168.1.1Ping 192.168.1.4同理在5600上也输入:Ping 192.168.1.2Ping 192.168.1.4至此,交换机之间的管理vlan 就可以互相通信。
三、开启TELNET登录3100,输入如下命令:System-viewUser-interface vty 0 4 //进入用户端口Authenticate-mode scheme //设置认证模式Protocol inbound all //允许telnet 和RSH 访问User privilege level 3 //设置访问级别QuitLocal-user iamcat //创建本地用户Password simple xxxxxx //设置密码Service-type telnet //访问服务类型:telnetLevel 3 //设置授权访问级别QuitSave在5100或5600上,即可用telnet 192.168.1.4配置3100交换机。
DHCP 典型配置【需求】DHCP 的主要用途是:通过DHCP服务器的协助来控管各个客户机(执行中的用户端)上不可缺少的网络配置参数,包括DNS(Domain Name Service 域名服务),WINS (Windows Internet Name Service Windows互联网名字服务)等。
【组网图】RouterA配置脚本#sysname RouterA#radius scheme system#domain system#dhcp server ip-pool 1 /创建DHCP 地址池/network 192.168.0.0 mask 255.255.255.0 /指定可以分配的地址段/gateway-list 192.168.0.1 /指定网关/dns-list 192.168.0.2 /指定DNS server地址/domain-name /指定域名/#interface Ethernet0/0ip address 192.168.0.1 255.255.255.0 /配置网关地址/#interface Serial2/0link-protocol ppp#interface NULL0#dhcp server forbidden-ip 192.168.0.1 192.168.0.2 /保留网关、DNS的地址/#user-interface con 0user-interface vty 0 4#return【验证】在PC上执行“ipconfig”,该PC已经通过DHCP自动获取IP地址、网关、域名信息。
C:\>ipconfigWindows IP ConfigurationEthernet adapter 本地连接:Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 192.168.0.3Subnet Mask . . . . . . . . . . . : 255.255.255.0Default Gateway . . . . . . . . . : 192.168.0.1【提示】1、只给出DHCP server上最基本的配置,其它可选配置可以查看《操作手册》5.1.2DHCP Relay典型配置【需求】路由器进行DHCP Relay,将DHCP报文进行中继。
H3C配置三层交换机配置H3C配置三层交换机配置H3C认证(H3C Certified Network Assistant)是中国第一家建立国际规范的完整的网络技术认证体系;是中国第一个走向国际市场的IT 厂商认证,在产品和教材上都具有完全的自主知识产权。
下面是店铺整理的`关于H3C配置三层交换机配置,欢迎大家参考!language-modechinese//切换到中文模式system-view//进入系统视图[H3C]displaycurrent-configuration//显示当前配置三层交换机//以下开始配置三层交换机配置三层交换机第一步:划分VLAN,并描述vlan1descriptionlocal-s3600//本交换机使用#vlan2descriptionlink-to-shanxicentre//陕西省中心#vlan3descriptionlink-to-shangjiecentre//商界分中心内部使用#vlan4descriptionlink-to-shangdongsuo//商东所#vlan5descriptionlink-to-shangnansuo//商南所配置三层交换机第二步:给VLAN划网关#interfaceVlan-interface2descriptionlinktoshanxicentreipaddress10.61.242.110255.255.255.252//省中心指定广域网关、子网掩码#interfaceVlan-interface3descriptionlinktoshangjiecentreipaddress10.161.134.65255.255.255.192//商界分中心局域网关、子网掩码#interfaceVlan-interface4descriptionlinktoshangdongsuoipaddress10.61.242.113255.255.255.252//商东所广域网关、子网掩码#interfaceVlan-interface5descriptionlinktoshangnansuoipaddress10.61.242.117255.255.255.252//商南所广域网关、子网掩码配置三层交换机第三步:给VLAN指定端口#interfaceEthernet1/0/2//将交换机的端口2指定给省中心使用descriptionlinktoshanxicentreportaccessvlan2#interfaceEthernet1/0/15-24//将交换机的端口15-24指定给分中心内部使用descriptionlinktoshangjiecentreportaccessvlan3#interfaceEthernet1/0/3//将交换机的端口3指定给商东所使用descriptionlinktoshangdongsuoportaccessvlan4#interfaceEthernet1/0/4//将交换机的端口4指定给商南所使用descriptionlinktoshangnansuoportaccessvlan5配置三层交换机第四步:配置路由协议//配静态路由(只用对远端设备配一条路由即可,本地自通)iproute0.0.0.00.0.0.010.61.242.109//指定所有网段到商东所的路由//配置三层交换机商东所的反向路由iproute10.161.134.0255.255.255.010.61.242.114iproute10.161.135.0255.255.255.010.61.242.114//配置三层交换机商南所的反向路由iproute10.161.135.0255.255.255.010.61.242.118iproute10.161.136.0255.255.255.010.61.242.118//省中心配置三层交换机:iproute10.61.242.0255.255.255.010.61.242.110//商东所242.114和商南所242.118共属的242.0指向分中心网关iproute10.161.134.0255.255.255.010.61.242.110//分中心内部网段指向分中心网关//iproute10.161.134.0255.255.255.010.61.242.110//iproute10.161.135.0255.255.255.010.61.242.110//iproute10.161.136.0255.255.255.010.61.242.110【H3C配置三层交换机配置】。
华为三层交换机配置方法(1)(2008-07-21 11:27:34)转载分类:工作汇报标签:杂谈本文以河南平临高速所使用的华为华三通信的H3C S3600-28P-SI为例,配置前首先要确定型号后缀是SI还是EI,EI的支持所有协议,SI的不支持OSPS动态协议,因此SI配置路由时可以使用静态协议和RIP协议,具体配置如下:<H3C>system-view //进入系统视图[H3C]display current-configuration //显示当前配置//以下开始配置//第一步:划分VLAN,并描述vlan 1description local-S3600vlan 2description link-to-wenquanvlan 3description link-to-ruzhouvlan 4description link-to-xiaotunvlan 5description link-to-baofengvlan 6description link-to-pingxivlan 7description link-to-pingnanvlan 8description Uplink-to-Putianvlan 9description link-to-pingxicentre//(2)配静态路由(只用对远101 in101 in101 in101 in0.0.0cisco 35500.0.0华为三层交换机配置实例一例网络技术2008-07-25 06:08:28 阅读243 评论0 字号:大中小订阅华为三层交换机配置实例一例0.0.0华为路由器与CISCO路由器在配置上的差别"华为路由器与同档次的CISCO路由器在功能特性与配置界面上完全一致,有些方面还根据国内用户的需求作了很好的改进。
例如中英文可切换的配置与调试界面,使中文用户再也不用面对着一大堆的英文专业单词而无从下手了。
h3c交换机配置命令大全其实不同厂家型号的交换机设置都是差不多的,只是不同厂家的交换机设置的命令是不同的!今天店铺就来给你介绍一下h3c交换机配置命令大全,希望你能够使用上!h3c交换机配置命令大全一.用户配置:system-view[H3C]super password H3C 设置用户分级密码[H3C]undo super password 删除用户分级密码[H3C]localuser bigheap 123456 1 Web网管用户设置,1(缺省)为管理级用户,缺省admin,admin[H3C]undo localuser bigheap 删除Web网管用户[H3C]user-interface aux 0 只支持0[H3C-Aux]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟[H3C-Aux]undo idle-timeout 恢复默认值[H3C]user-interface vty 0 只支持0和1[H3C-vty]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟[H3C-vty]undo idle-timeout 恢复默认值[H3C-vty]set authentication password 123456 设置telnet密码,必须设置[H3C-vty]undo set authentication password 取消密码[H3C]display users 显示用户[H3C]display user-interface 显示用户界面状态二.系统IP配置:[H3C]vlan 20[H3C]management-vlan 20[H3C]interface vlan-interface 20 创建并进入管理VLAN[H3C]undo interface vlan-interface 20 删除管理VLAN接口[H3C-Vlan-interface20]ip address 192.168.1.2 255.255.255.0 配置管理VLAN接口静态IP地址(缺省为192.168.0.234) [H3C-Vlan-interface20]undo ip address 删除IP地址[H3C-Vlan-interface20]ip gateway 192.168.1.1 指定缺省网关(默认无网关地址)[H3C-Vlan-interface20]undo ip gateway[H3C-Vlan-interface20]shutdown 关闭接口[H3C-Vlan-interface20]undo shutdown 开启[H3C]display ip 显示管理VLAN接口IP的相关信息[H3C]display interface vlan-interface 20 查看管理VLAN的接口信息debugging ip 开启IP调试功能undo debugging ip三.DHCP客户端配置:[H3C-Vlan-interface20]ip address dhcp-alloc 管理VLAN接口通过DHCP方式获取IP地址[H3C-Vlan-interface20]undo ip address dhcp-alloc 取消[H3C]display dhcp 显示DHCP客户信息debugging dhcp-alloc 开启DHCP调试功能undo debugging dhcp-alloc。
sH3C交换机################################################1、system-view进入系统视图模式2、sysname为设备命名3、display current-configuration 当前配置情况4、 language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、 port link-type Access|Trunk|Hybrid设置端口访问模式7、 undo shutdown打开以太网端口8、 shutdown关闭以太网端口9、 quit退出当前视图模式10、 vlan 10创建VLAN 10并进入VLAN 10的视图模式11、 port access vlan 10在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all允许所有的vlan通过H3C路由器################################################################################ ######1、system-view进入系统视图模式2、sysname R1为设备命名为R13、display ip routing-table 显示当前路由表4、 language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、 ip address 192.168.1.1 255.255.255.0配置IP地址和子网掩码7、 undo shutdown打开以太网端口8、 shutdown关闭以太网端口9、 quit退出当前视图模式10、 ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、 ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router################################################################################ ##########1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、 language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置 :<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。
H3C交换机基本配置命令明细⼀览1:配置登录⽤户,⼝令等<H3C> //⽤户直⾏模式提⽰符,⽤户视图<H3C>system-view //进⼊配置视图[H3C] //配置视图(配置密码后必须输⼊密码才可进⼊配置视图)[H3C] sysname xxx //设置主机名成为xxx这⾥使⽤修改特权⽤户密码<H3C>system-view[H3C]super password level 3 cipher/simple xxxxx //设置本地登录交换机命令[H3C] aaa //进⼊aaa认证模式定义⽤户账户[H3C-aaa] local-user duowan password cipher duowan[H3C-aaa] local-user duowan level 15[H3C-aaa] local-user duowan service-type telnet terminal ssh //有时候这个命令是最先可以运 //⾏的,上边两个命令像password,level都是定义完vty 的 // authentication-mode aaa后才出现[H3C-aaa] quit[H3C] user-interface vty 0 4 //当时很奇怪这个命令就是找不到,最后尝试了⼏次才能运⾏[H3C-ui-vty0-4] authentication-mode aaa[H3C-ui-vty0-4] quit单独设置远程登录账户:<H3C>system-view[H3C]user-interface vty 0 4[H3C-ui-vty0-4]authentication-mode password //设置登录模式[H3C-ui-vty0-4]user privilege level 3 //管理权限配置,3为管理级权限[H3C-ui-vty0-4]set authentication password cipher 123456 //设置登录密码以密⽂⽅式登录[H3C-ui-vty0-4]quit[H3C]2:H3C VLan设置创建vlan:<H3C> //⽤户直⾏模式提⽰符,⽤户视图<H3C>system-view //进⼊配置视图[H3C] vlan 10 //创建vlan 10,并进⼊vlan10配置视图,如果vlan10存在就直接进⼊vlan10配置视图[H3C-vlan10] quit //回到配置视图[H3C] vlan 100 //创建vlan 100,并进⼊vlan100配置视图,如果vlan10存在就直接进⼊vlan100配置视图[H3C-vlan100] quit //回到配置视图将端⼝加⼊到vlan中:[H3C] interface GigabitEthernet2/0/1 (10G光⼝)[H3C- GigabitEthernet2/0/1] port link-type access //定义端⼝传输模式[H3C- GigabitEthernet2/0/1] port default vlan 100 //将端⼝加⼊vlan100[H3C- GigabitEthernet2/0/1] quit[H3C] interface GigabitEthernet1/0/0 //进⼊1号插槽上的第⼀个千兆⽹⼝配置视图中。
华为三层交换机配置方法(1)时间:2021.03.05 创作:欧阳理(2008-07-21 11:27:34)分类:工作汇报标签:杂谈本文以河南平临高速所使用的华为华三通信的H3CS3600-28P-SI为例,配置前首先要确定型号后缀是SI还是EI,EI的支持所有协议,SI的不支持OSPS动态协议,因此SI配置路由时可以使用静态协议和RIP协议,具体配置如下:<H3C>system-view //进入系统视图[H3C]display current-configuration //显示当前配置//以下开始配置//第一步:划分VLAN,并描述vlan 1description local-S3600vlan 2description link-to-wenquanvlan 3description link-to-ruzhouvlan 4description link-to-xiaotunvlan 5description link-to-baofengvlan 6description link-to-pingxivlan 7description link-to-pingnanvlan 8description Uplink-to-Putianvlan 9description link-to-pingxicentre//第二步:给VLAN 划网关interface Vlan-interface2description link to wenquanip address 10.41.77.41 255.255.255.192 interface Vlan-interface3description link to ruzhouip address 10.41.77.105 255.255.255.192interface Vlan-interface4description link to xiaotunip address 10.41.77.169 255.255.255.192 interface Vlan-interface5description link to baofengip address 10.41.77.233 255.255.255.192 interface Vlan-interface6description link to pingxiip address 10.41.78.41 255.255.255.192 interface Vlan-interface7description link to pingnanip address 10.41.78.105 255.255.255.192 interface Vlan-interface8description uplink to putianip address 10.41.244.102 255.255.255.252 interface Vlan-interface9description link to pingxicentreip address 10.41.80.233 255.255.255.192 //第三步:给VLAN 指定端口interface Ethernet1/0/2description link to wenquanport access vlan 2interface Ethernet1/0/3description link to ruzhouport access vlan 3interface Ethernet1/0/4description link to xiaotunport access vlan 4interface Ethernet1/0/5description link to baofengport access vlan 5interface Ethernet1/0/6description link to pingxiport access vlan 6interface Ethernet1/0/7description link to pingnanport access vlan 7interface Ethernet1/0/8description uplink to putianport access vlan 8interface Ethernet1/0/9 to Ethernet1/0/24 description link to pingxicentreport access vlan 9//第四步:配置路由协议//(1)用RIP配动态路由ripnetwork 10.41.77.41network 10.41.77.105network 10.41.77.169network 10.41.77.233network 10.41.78.41network 10.41.78.105network 10.41.80.233network 10.41.244.102//(2)配静态路由(只用对远华为三层交换机配置命令分类:默认栏目2007.6.2 07:28 作者:weiwei2501 | 评论:1 | 阅读:0 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.1Service dhcp //提供DHCP服务ip routing //启用三层交换机上的路由模块ExitVtp mode server //定义VTP工作模式为sever模式Vtp domain centervtp //定义VTP域的名称为centervtpVlan 2 name vlan2 //定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002)Vlan 3 name vlan3Vlan 4 name vlan4Vlan 5 name vlan5Vlan 6 name vlan6Vlan 7 name vlan7Vlan 8 name vlan8Vlan 9 name vlan9Exitinterface Port-channel 1 //进入虚拟的以太通道组1Interface gigabitethernet 0/1 //进入模块0上的吉比特以太口1channel-group 1 mode on //把这个接口放到快速以太通道组1中Interface gigabitethernet 0/2 //同上channel-group 1 mode onport-channel load-balance src-dst-ip //定义快速以太通道组的负载均衡方式(依靠源和目的IP的方式)interface gigabitethernet 0/3 //进入模块0上的吉比特以太口3interface gigabitethernet 0/4 //同上interface gigbitethernet 0/5 //同上interface gigbitethernet 0/6 //同上interface gigbitethernet 0/7 //进入模块0上的吉比特以太口7no shutdownspanning-tree vlan 6-9 cost 1000 //在生成树中,vlan6-9的开销定义为10000interface range gigabitethernet 0/8 – 10 //进入模块0上的吉比特以太口8,9,10no shutdownspanning-tree portfast //在这些接口上使用portfast(使用portfast以后,在生成树的时候不参加运算,直接成为转发状态)interface gigabitethernet 0/11 //进入模块0上的吉比特以太口11interface gigabitethernet 0/12 //同上interface vlan 1 //进入vlan1的逻辑接口(不是物理接口,用来给vlan 做路由用)ip address 172.16.1.7 255.255.255.0 //配置IP地址和子网掩码no shutdownstandby 1 ip 172.16.1.9 //开启了冗余热备份(HSRP),冗余热备份组1,虚拟路由器的IP地址为172.16.1.9standby 1 priority 110 preempt //定义这个三层交换机在冗余热备份组1中的优先级为110,preempt是用来开启抢占模式interface vlan 2 //同上ip address 172.16.2.252 255.255.255.0no shutdownstandby 2 ip 172.16.2.254standby 2 priority 110 preemptip access-group 101 in //在入方向上使用扩展的访问控制列表101interface vlan 3 //同上ip address 172.16.3.252 255.255.255.0no shutdownstandby 3 ip 172.16.3.254standby 3 priority 110 preemptip access-group 101 ininterface vlan 4 //同上ip address 172.16.4.252 255.255.255.0no shutdownstandby 4 ip 172.16.4.254standby 4 priority 110 preemptip access-group 101 ininterface vlan 5ip address 172.16.5.252 255.255.255.0no shutdownstandby 5 ip 172.16.5.254standby 5 priority 110 preemptip access-group 101 ininterface vlan 6ip address 172.16.6.252 255.255.255.0no shutdownstandby 6 ip 172.16.6.254standby 6 priority 100 preemptinterface vlan 7ip address 172.16.7.252 255.255.255.0no shutdownstandby 7 ip 172.16.7.254standby 7 priority 100 preemptinterface vlan 8ip address 172.16.8.252 255.255.255.0no shutdownstandby 8 ip 172.16.8.254standby 8 priority 100 preemptinterface vlan 9ip address 172.16.9.252 255.255.255.0no shutdownstandby 9 ip 172.16.9.254standby 9 priority 100 preemptaccess-list 101 deny ip any 172.16.7.0 0.0.0.255 //扩展的访问控制列表101 access-list 101 permit ip any anyInterface vlan 1 //进入vlan1这个逻辑接口Ip helper-address 172.16.8.1 //可以转发广播(helper-address的作用就是把广播转化为单播,然后发向172.16.8.1)Interface vlan 2Ip helper-address 172.16.8.1Interface vlan 3ip helper-address 172.16.8.1interface vlan 4ip helper-address 172.16.8.1interface vlan 5ip helper-address 172.16.8.1interface vlan 6ip helper-address 172.16.8.1interface vlan 7ip helper-address 172.16.8.1interface vlan 9ip helper-address 172.16.8.1router rip //启用路由协议RIPversion 2 //使用的是RIPv2,如果没有这句,则是使用RIPv1network 172.16.0.0 //宣告直连的网段exitip route 0.0.0.0 0.0.0.0 172.16.9.250 //缺省路由,所有在路由表中没有办法匹配的数据包,都发向下一跳地址为172.16.9.250这个路由器line con 0line aux 0line vty 0 15 //telnet线路(路由器只有5个,是0-4)password 12345678 //login密码loginendcopy running-config startup-config 保存配置cisco 3550Switch# configure terminalSwitch(config)#vtp mode transparentSwitch(config)#vlan 10Switch(config-vlan)# name vlan10Switch(config)#exitSwitch(config)#vlan 11Switch(config-vlan)name vlan11Switch(config-vlan)endSwitch#configure terminalSwitch(config)#interface fastethernet0/9Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 10Switch(config-if)#exitSwitch(config)#interface fastethernet0/10Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 10Switch(config-if)#exitSwitch(config)#interface fastethernet0/11Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 11Switch(config-if)#exitSwitch(config)#interface fastethernet0/12Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 11Switch(config-if)#exitSwitch(config)#interface vlan10Switch(config-if)#ip address 192.168.0.1 255.255.255.0Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#interface vlan11Switch(config-if)#ip address 192.168.1.1 255.255.255.0Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#ip routingSwitch(config)#ip forward-protocol udpSwitch(config)#inter vlan 10ip helper 172.16.11.255 //这个命令又是什么意思?是不是转发整个网段的UDP协议?为什么用到了172.16.11.255这个地址?Switch(config)#exitSwitch(config)#inter vlan 11Switch(config-if)#ip helper 172.16.10.255 //同上?Switch(config-if)#exitSwitch(config)#ip route 0.0.0.0 0.0.0.0 Vlan10Switch(config)#ip route 0.0.0.0 0.0.0.0 Vlan11Switch(config)#conf tSwitch(config)#access-list 103 permit ip 172.16.11.0 0.0.0.255 172.16.10.00.0.0.255Switch(config)#access-list 103 permit udp any any eq bootpcSwitch(config)#access-list 103 permit udp any any eq tftpSwitch(config)#access-list 103 permit udp any eq bootpc anySwitch(config)#access-list 103 permit udp any eq tftp anySwitch(config)#inter vlan 10Switch(config-if)#ip directed-broadcast 103 //请解释一下这个的具体含义,本人不是太明白,懂一点意思(直接广播这个列表?是不是)Switch(config-if)#exitSwitch(config)#access-list 104 permit ip 172.16.10.0 0.0.0.255 172.16.11.00.0.0.255Switch(config)#access-list 104 permit udp any any eq bootpcSwitch(config)#access-list 104 permit udp any any eq tftpSwitch(config)#access-list 104 permit udp any eq bootpc anySwitch(config)#access-list 104 permit udp any eq tftp anySwitch(config)#inter vlan 11Switch(config-if)#ip directed-broadcast 104 //同上Switch(config)#endSwitch#copy run star华为三层交换机配置实例一例网络技术 2008-07-25 06:08:28 阅读243 评论0 字号:大中小订阅华为三层交换机配置实例一例服务器1双网卡,内网IP:192.168.0.1,其它计算机通过其代理上网PORT1属于VLAN1PORT2属于VLAN2PORT3属于VLAN3VLAN1的机器可以正常上网配置VLAN2的计算机的网关为:192.168.1.254配置VLAN3的计算机的网关为:192.168.2.254即可实现VLAN间互联如果VLAN2和VLAN3的计算机要通过服务器1上网则需在三层交换机上配置默认路由系统视图下:ip route-static 0.0.0.0 0.0.0.0 192.168.0.1 然后再在服务器1上配置回程路由进入命令提示符route add 192.168.1.0 255.255.255.0 192.168.0.254route add 192.168.2.0 255.255.255.0 192.168.0.254这个时候vlan2和vlan3中的计算机就可以通过服务器1访问internet了~~华为路由器与CISCO路由器在配置上的差别"华为路由器与同档次的CISCO路由器在功能特性与配置界面上完全一致,有些方面还根据国内用户的需求作了很好的改进。
sH3C交换机################################################1、system-view进入系统视图模式2、sysname为设备命名3、display current-configuration 当前配置情况4、 language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、 port link-type Access|Trunk|Hybrid设置端口访问模式7、 undo shutdown打开以太网端口8、 shutdown关闭以太网端口9、 quit退出当前视图模式10、 vlan 10创建VLAN 10并进入VLAN 10的视图模式11、 port access vlan 10在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all允许所有的vlan通过H3C路由器################################################################################ ######1、system-view进入系统视图模式2、sysname R1为设备命名为R13、display ip routing-table 显示当前路由表4、 language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、 ip address 192.168.1.1 255.255.255.0配置IP地址和子网掩码7、 undo shutdown打开以太网端口8、 shutdown关闭以太网端口9、 quit退出当前视图模式10、 ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、 ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router################################################################################ ##########1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、 language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置 :<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。
H3C交换机基本配置命令明细1:配置登录用户,口令等//用户直行模式提示符,用户视图system-view //进入配置视图[H3C] //配置视图(配置密码后必须输入密码才可进入配置视图)[H3C] sysname //设置主机名成为这里使用修改特权用户密码system-view[H3C]super password level 3 cipher/simple //设置本地登录交换机命令[H3C] aaa //进入aaa认证模式定义用户账户[H3C-aaa] local-user duowan password cipher duowan[H3C-aaa] local-user duowan level 15[H3C-aaa] local-user duowan service-type telnet terminal ssh //有时候这个命令是最先可以运 //行的,上边两个命令像password,level都是定义完vty 的 // authentication-mode aaa后才出现[H3C-aaa] quit[H3C] user-interface vty 0 4 //当时很奇怪这个命令就是找不到,最后尝试了几次才能运行[H3C-ui-vty0-4] authentication-mode aaa[H3C-ui-vty0-4] quit单独设置远程登录账户:system-view[H3C]user-interface vty 0 4[H3C-ui-vty0-4]authentication-mode password //设置登录模式[H3C-ui-vty0-4]user privilege level 3 //管理权限配置,3为管理级权限[H3C-ui-vty0-4]set authentication password cipher //设置登录密码以密文方式登录[H3C-ui-vty0-4]quit[H3C]2:H3C VLan设置创建vlan://用户直行模式提示符,用户视图system-view //进入配置视图[H3C] vlan 10 //创建vlan 10,并进入vlan10配置视图,如果vlan10存在就直接进入vlan10配置视图[H3C-vlan10] quit //回到配置视图[H3C] vlan 100 //创建vlan 100,并进入vlan100配置视图,如果vlan10存在就直接进入vlan100配置视图[H3C-vlan100] quit //回到配置视图将端口加入到vlan中:[H3C] interface GigabitEthernet2/0/1 (10G光口)[H3C- GigabitEthernet2/0/1] port link-type access //定义端口传输模式[H3C- GigabitEthernet2/0/1] port default vlan 100 //将端口加入vlan100[H3C- GigabitEthernet2/0/1] quit[H3C] interface GigabitEthernet1/0/0 //进入1号插槽上的第一个千兆网口配置视图中。
华为华三三层交换机配置展开全文华为三层交换机配置方法(1)本文以华为华三通信的H3C S3600-28P-SI为例,配置前首先要确定型号后缀是SI还是EI,EI的支持所有协议,SI的不支持OSPS动态协议,因此SI配置路由时可以使用静态协议和RIP协议,具体配置如下:<H3C>system-view //进入系统视图[H3C]display current-configuration //显示当前配置//以下开始配置//第一步:划分VLAN,并描述vlan 1description local-S3600vlan 2description link-to-wenquanvlan 3description link-to-ruzhouvlan 4description link-to-xiaotunvlan 5description link-to-baofengvlan 6description link-to-pingxivlan 7description link-to-pingnanvlan 8description Uplink-to-Putianvlan 9description link-to-pingxicentre//第二步:给VLAN 划网关interface Vlan-interface2description link to wenquanip address 10.41.77.41 255.255.255.192 interface Vlan-interface3description link to ruzhouip address 10.41.77.105 255.255.255.192 interface Vlan-interface4description link to xiaotunip address 10.41.77.169 255.255.255.192 interface Vlan-interface5description link to baofengip address 10.41.77.233 255.255.255.192 interface Vlan-interface6description link to pingxiip address 10.41.78.41 255.255.255.192 interface Vlan-interface7description link to pingnanip address 10.41.78.105 255.255.255.192 interface Vlan-interface8description uplink to putianip address 10.41.244.102 255.255.255.252 interface Vlan-interface9description link to pingxicentreip address 10.41.80.233 255.255.255.192 //第三步:给VLAN 指定端口interface Ethernet1/0/2description link to wenquanport access vlan 2interface Ethernet1/0/3description link to ruzhouport access vlan 3interface Ethernet1/0/4description link to xiaotunport access vlan 4interface Ethernet1/0/5description link to baofengport access vlan 5interface Ethernet1/0/6description link to pingxiport access vlan 6interface Ethernet1/0/7description link to pingnanport access vlan 7interface Ethernet1/0/8description uplink to putianport access vlan 8interface Ethernet1/0/9 to Ethernet1/0/24 description link to pingxicentreport access vlan 9//第四步:配置路由协议//(1)用RIP配动态路由ripnetwork 10.41.77.41network 10.41.77.105network 10.41.77.169network 10.41.77.233network 10.41.78.41network 10.41.78.105network 10.41.80.233network 10.41.244.102//(2)配静态路由(只用对远华为三层交换机配置命令分类:默认栏目2007.6.2 07:28 作者:weiwei2501 | 评论:1 | 阅读:0Enable //进入私有模式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.1Service dhcp //提供DHCP服务ip routing //启用三层交换机上的路由模块ExitVtp mode server //定义VTP工作模式为sever模式Vtp domain centervtp //定义VTP域的名称为centervtpVlan 2 name vlan2 //定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002)Vlan 3 name vlan3Vlan 4 name vlan4Vlan 5 name vlan5Vlan 6 name vlan6Vlan 7 name vlan7Vlan 8 name vlan8Vlan 9 name vlan9Exitinterface Port-channel 1 //进入虚拟的以太通道组1Interface gigabitethernet 0/1 //进入模块0上的吉比特以太口1 channel-group 1 mode on //把这个接口放到快速以太通道组1中Interface gigabitethernet 0/2 //同上channel-group 1 mode onport-channel load-balance src-dst-ip //定义快速以太通道组的负载均衡方式(依靠源和目的IP的方式)interface gigabitethernet 0/3 //进入模块0上的吉比特以太口3interface gigabitethernet 0/4 //同上interface gigbitethernet 0/5 //同上interface gigbitethernet 0/6 //同上interface gigbitethernet 0/7 //进入模块0上的吉比特以太口7 no shutdownspanning-tree vlan 6-9 cost 1000 //在生成树中,vlan6-9的开销定义为10000interface range gigabitethernet 0/8 – 10 //进入模块0上的吉比特以太口8,9,10no shutdownspanning-tree portfast //在这些接口上使用portfast(使用portfast以后,在生成树的时候不参加运算,直接成为转发状态)interface gigabitethernet 0/11 //进入模块0上的吉比特以太口11interface gigabitethernet 0/12 //同上interface vlan 1 //进入vlan1的逻辑接口(不是物理接口,用来给vlan做路由用)ip address 172.16.1.7 255.255.255.0 //配置IP地址和子网掩码no shutdownstandby 1 ip 172.16.1.9 //开启了冗余热备份(HSRP),冗余热备份组1,虚拟路由器的IP地址为172.16.1.9standby 1 priority 110 preempt //定义这个三层交换机在冗余热备份组1中的优先级为110,preempt是用来开启抢占模式interface vlan 2 //同上ip address 172.16.2.252 255.255.255.0no shutdownstandby 2 ip 172.16.2.254standby 2 priority 110 preemptip access-group 101 in //在入方向上使用扩展的访问控制列表101interface vlan 3 //同上ip address 172.16.3.252 255.255.255.0no shutdownstandby 3 ip 172.16.3.254standby 3 priority 110 preemptip access-group 101 ininterface vlan 4 //同上ip address 172.16.4.252 255.255.255.0no shutdownstandby 4 ip 172.16.4.254standby 4 priority 110 preemptip access-group 101 ininterface vlan 5ip address 172.16.5.252 255.255.255.0 no shutdownstandby 5 ip 172.16.5.254standby 5 priority 110 preemptip access-group 101 ininterface vlan 6ip address 172.16.6.252 255.255.255.0 no shutdownstandby 6 ip 172.16.6.254standby 6 priority 100 preemptinterface vlan 7ip address 172.16.7.252 255.255.255.0 no shutdownstandby 7 ip 172.16.7.254standby 7 priority 100 preemptinterface vlan 8ip address 172.16.8.252 255.255.255.0 no shutdownstandby 8 ip 172.16.8.254standby 8 priority 100 preemptinterface vlan 9ip address 172.16.9.252 255.255.255.0 no shutdownstandby 9 ip 172.16.9.254standby 9 priority 100 preemptaccess-list 101 deny ip any 172.16.7.0 0.0.0.255 //扩展的访问控制列表101access-list 101 permit ip any anyInterface vlan 1 //进入vlan1这个逻辑接口Ip helper-address 172.16.8.1 //可以转发广播(helper-address的作用就是把广播转化为单播,然后发向172.16.8.1)Interface vlan 2Ip helper-address 172.16.8.1Interface vlan 3ip helper-address 172.16.8.1interface vlan 4ip helper-address 172.16.8.1interface vlan 5ip helper-address 172.16.8.1interface vlan 6ip helper-address 172.16.8.1interface vlan 7ip helper-address 172.16.8.1interface vlan 9ip helper-address 172.16.8.1router rip //启用路由协议RIPversion 2 //使用的是RIPv2,如果没有这句,则是使用RIPv1network 172.16.0.0 //宣告直连的网段exitip route 0.0.0.0 0.0.0.0 172.16.9.250 //缺省路由,所有在路由表中没有办法匹配的数据包,都发向下一跳地址为172.16.9.250这个路由器line con 0line aux 0line vty 0 15 //telnet线路(路由器只有5个,是0-4)password 12345678 //login密码loginendcopy running-config startup-config 保存配置cisco 3550Switch# configure terminalSwitch(config)#vtp mode transparentSwitch(config)#vlan 10Switch(config-vlan)# name vlan10Switch(config)#exitSwitch(config)#vlan 11Switch(config-vlan)name vlan11Switch(config-vlan)endSwitch#configure terminalSwitch(config)#interface fastethernet0/9Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 10Switch(config-if)#exitSwitch(config)#interface fastethernet0/10Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 10Switch(config-if)#exitSwitch(config)#interface fastethernet0/11Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 11Switch(config-if)#exitSwitch(config)#interface fastethernet0/12Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 11Switch(config-if)#exitSwitch(config)#interface vlan10Switch(config-if)#ip address 192.168.0.1 255.255.255.0Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#interface vlan11Switch(config-if)#ip address 192.168.1.1 255.255.255.0Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#ip routingSwitch(config)#ip forward-protocol udpSwitch(config)#inter vlan 10ip helper 172.16.11.255 //这个命令又是什么意思?是不是转发整个网段的UDP协议?为什么用到了172.16.11.255这个地址?Switch(config)#exitSwitch(config)#inter vlan 11Switch(config-if)#ip helper 172.16.10.255 //同上?Switch(config-if)#exitSwitch(config)#ip route 0.0.0.0 0.0.0.0 Vlan10Switch(config)#ip route 0.0.0.0 0.0.0.0 Vlan11Switch(config)#conf tSwitch(config)#access-list 103 permit ip 172.16.11.00.0.0.255 172.16.10.0 0.0.0.255Switch(config)#access-list 103 permit udp any any eq bootpc Switch(config)#access-list 103 permit udp any any eq tftpSwitch(config)#access-list 103 permit udp any eq bootpc any Switch(config)#access-list 103 permit udp any eq tftp anySwitch(config)#inter vlan 10Switch(config-if)#ip directed-broadcast 103 //请解释一下这个的具体含义,本人不是太明白,懂一点意思(直接广播这个列表?是不是)Switch(config-if)#exitSwitch(config)#access-list 104 permit ip 172.16.10.0 0.0.0.255 172.16.11.0 0.0.0.255Switch(config)#access-list 104 permit udp any any eq bootpc Switch(config)#access-list 104 permit udp any any eq tftpSwitch(config)#access-list 104 permit udp any eq bootpc any Switch(config)#access-list 104 permit udp any eq tftp anySwitch(config)#inter vlan 11Switch(config-if)#ip directed-broadcast 104 //同上Switch(config)#endSwitch#copy run star华为三层交换机配置实例一例华为三层交换机配置实例一例服务器1双网卡,内网IP:192.168.0.1,其它计算机通过其代理上网PORT1属于VLAN1PORT2属于VLAN2PORT3属于VLAN3VLAN1的机器可以正常上网配置VLAN2的计算机的网关为:192.168.1.254配置VLAN3的计算机的网关为:192.168.2.254即可实现VLAN间互联如果VLAN2和VLAN3的计算机要通过服务器1上网则需在三层交换机上配置默认路由系统视图下:ip route-static 0.0.0.0 0.0.0.0 192.168.0.1然后再在服务器1上配置回程路由进入命令提示符route add 192.168.1.0 255.255.255.0 192.168.0.254route add 192.168.2.0 255.255.255.0 192.168.0.254这个时候vlan2和vlan3中的计算机就可以通过服务器1访问internet了~~华为路由器与CISCO路由器在配置上的差别"华为路由器与同档次的CISCO路由器在功能特性与配置界面上完全一致,有些方面还根据国内用户的需求作了很好的改进。
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} ;配置端口平接扭接
[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} ;设置端口工作模式
[Quidway-Ethernet0/1]port access vlan
3 ;当前端口加入到VLAN
[Quidway-Ethernet0/2]port trunk permit vlan {ID|All} ;设trunk允许的VLAN
[Quidway-Ethernet0/3]port trunk pvid vlan 3 ;设置trunk端口的PVID
[Quidway-Ethernet0/1]undo
shutdown ;激活端口[Quidway-Ethernet0/1]shutdown
;关闭端口
[Quidway-Ethernet0/1]quit
;返回
[Quidway]vlan
3
;创建VLAN
[Quidway-vlan3]port ethernet 0/1 ;在VLAN中增加端口
[Quidway-vlan3]port
e0/1
;简写方式
[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 ;在VLAN中增加端口
[Quidway-vlan3]port e0/1 to
e0/4 ;简写方式
[Quidway]monitor-port <interface_type interface_num> ;指定镜像端口
[Quidway]port mirror <interface_type interface_num> ;指定被镜像端口
[Quidway]port mirror int_list observing-port int_type int_num ;指定镜像和被镜像
[Quidway]description
string ;指定VLAN描述字符
[Quidway]description
;删除VLAN描述字符
[Quidway]display vlan
[vlan_id]
;查看VLAN设置
[Quidway]stp
{enable|disable}
;设置生成树,默认关闭
[Quidway]stp priority
4096 ;设置交换机的优先级
[Quidway]stp root
{primary|secondary} ;设置为根或根的备份
[Quidway-Ethernet0/1]stp cost
200 ;设置交换机端口的花费
[Quidway]link-aggregation e0/1 to e0/4
ingress|both ; 端口的聚合
[Quidway]undo link-aggregation
e0/1|all ; 始端口为通道号
[SwitchA-vlanx]isolate-user-vlan
enable ;设置主vlan
[SwitchA]isolate-user-vlan <x> secondary <list> ;设置主vlan包括的子vlan
[Quidway-Ethernet0/2]port hybrid pvid vlan <id> ;设置vlan的pvid
[Quidway-Ethernet0/2]port hybrid
pvid ;删除vlan的pvid。