华为交换路由超详细基础配置备忘录_第1页
华为交换路由超详细基础配置备忘录_第2页
华为交换路由超详细基础配置备忘录_第3页
华为交换路由超详细基础配置备忘录_第4页
华为交换路由超详细基础配置备忘录_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、*2014级计算机网络一华为配置备忘录lys整理*telnet丙己置r3user-interface vty 0 4r3-ui-vty0-4authentication-mode password丿訂用密码验证r3-ui-vty0-4set authentication pass cipher huawei 设置密码为 huaweir3-ui-vty0-4user privilege level 3/设置用户级另lj (默认参观级)注:0参观级,1监控级,2配置级,3管理级telnet配置一配置多个用户,并授予不同管理级别r3aaar3-aaalocal-user admin password

2、 cipher 123 privilege level 3 /配置本地验证,并设置账户 admin跟密码123跟用户级别为3r3-aaalocal-user admin service-type telnet配置该账户用于 telnet 登录r3-aaauser-interface vty 0 4r3-ui-vty0-4authentication-mode aaa进入 vtyo 4 把验证方式改成 aaa 验证ftp的使用is 查看ftp文件夹内容 cd 进入文件夹dir查看文件属性get下载指定文件put上传指定文件路由器为ftp server端arijftp server enable

3、开启 ftp 服务arl-aaalocal-user ftpl password cipher 123 privilege level 15创建用户 ftpl 密码 123用户级别15arl-aaalocal-user ftpl ftp-directory flash: 指定用户 adminl 可访问 flash: fl 录arl-aaalocal-user ftpl service-type ftp设宜服务类型为 ftp 交 换 机 基 本 配 置设直双工模式手动设置全双工sl-gigabitetherneto/0/lundo negotiation auto /关闭自动协商 sl-giga

4、bitetherneto/o/lduplex full 设置全双 t.口动协商为全双工sl-gigabitetherneto/0/lauto duplex full设證接口速率sl-gigabitethernet0/0/lundo negotiation auto /关闭自动协商 sl-gigabitetherneto/o/lspeed 100设置接 口速率vian的操作/vlan的描述huaweijvlan 10创建单个 vlanhuawei-vlanlodescription hw 把 vlanlo 名 7改成 hw单个vlan的划分huaweijvlan 10创建单个 vlanhuawe

5、ijvlan batch 20 30 40 50/一次创建多个 vlanslinterface g0/0/1sl-gigabitetherneto/0/lport link-type access 把端口设置成接入模式sl-gigabitethernet0/0/lport default vlan 10 把端 口划给 vlanlo批量进入端口批量设置成接入模式批量把端口划给vlan20批量划分vlansljinterface range g 0/0/1 to g0/0/20 sl-port-groupport link-type access *sl-port-groupport defaul

6、t vlan 20 *slvlan20*sl-vlan20port g 0/0/1 to 0/0/20 另一种批量划分vlan的方法,前提耍把接口设置 成access模式设置trunk链路,允许不同vlan通过sl-gigabitethernet0/0/24port link-type trunk设置 trunk 链路sl-gigabitethernet0/0/24port trunk allow-pass vlan all /设置允许所有 vlan 的数据通过,默 认只给vlanl通过 设置hybrid链路模式下的vlan和和终端端口配置hybridsljinterface g 0/0/1s

7、l-gigabitethernet0/0/lport link-type hybrid 当链路类型不是 hybrid 吋用sl-gigabitetherneto/0/lport hybrid pvid vlan 10 设置 hybrid 类型接口默认为 vlanlo,相 当于把这个接口划给vlanlosl-gigabitethernet0/0/lport hybrid untagged vlan 10 20 设置该接口 可以通过哪些 vlan 的 数据,该命令可以在二层交换机下可实现跨vlan互访*交换机间端口配置hybridsi interface g 0/0/2sl-gigabitethe

8、rnet0/0/2port hybrid tagged vlan 10 20 30 / 设置该接 口可以转发的 vlanl0,20z30的数据,相当于原來的trunk模式stp的配置slstp enable 启用stp (华为交换机默认启用mstp)sijstp mode stp 将stp模式改成普通生成树stpslstp mode rstp将 stp 模式改成 rstpsijstp mode mstp将 stp 模式改 mstpsl-ethemet0/0/10stp edged-port enable 指定边缘端口,给终端设备配sldisplay stp 查看 stp 的信息sldispla

9、y stp brief杏看 stp 的摘要信息sldisplay stp instance 2 brief 査看实例 2 的摘要信息*“*根交换机的指定修改优先级指定根交换机sijstp priority 4096修改优先级为4096,值越小优先级越高,优先级必须为4096的倍数直接指定为根交换机sijstp root primary肓接指定为根交换机s3stp root secondary 直接指定为备份根交换机手动设置端口的开销值s3-ethernet0/0/2stp cost 2000/mstp的配置sijstp region-configuration 进入 mst 域视图sl-mst

10、-regionregion-name huawei 配置 mst 域名为 huawei sl-mst-regionrevision-level 1配迸 mstp 的修订级别为 1sl-mst-regioninstance 1 vlan 10 指定 vlan 10 映射到 mathsl-mst-regioninstance 2 vlan 20 指定 vlan20 映射到 mati2sl-mst-regionactive region-configuration 激活 mst 域配置村在s2, s3上做同样配置,注意,同一 mst域中,域名、修订级别、vlan映射关系要相 同s2stp insta

11、nce 2 priority 0 指定s2为实例2的根交换机链路聚合的配置手工负载分担模式slinterface eth-trunk 1 创建 eth-trunkl 接口sl-eth-trunklmode manual load-balance 指定为手工负载分担模式slintg 0/0/1sl-gigabitetherneto/o/leth-trunk 1 把端 口 划入 eth-trunkl 接 usljintg 0/0/2sl-gigabitethernet0/0/2eth-trunk 1*s2上做同样配置静态lacp模式slinterface eth-trunk 1sl-eth-tru

12、nklmode lacp-static 指定为静态 lacp 模式slintg 0/0/1sl-gigabitetherneto/o/leth-trunk 1slintg 0/0/2sl-gigabitetherneto/o/2eth-trunk 1*s2上做同样配置三链路链路聚合兀余sllacp priority 100修改系统优先级为100,使其成为主动端sljinterface eth-trunk 1sl-eth-trunklmax active-linknumber 2 修改 si 上活动的接口上限为 2 sljintg 0/0/1sl-gigabitetherneto/o/llacp

13、 priority 100 配置端口的优先级确定活动链路sljintg 0/0/2sl-gigabitethernet0/0/2lacp priority 100浮动路由的配置huaweijip route-static 24 preference 100 将路由优先级设置成 100 (默认60)rip的配置rljriprl-rip-lnetwork rl-rip-lversion 2rl-rip-limport-route direct注入总连路山rl-rip-limport-route static注入挣态路由rl-rip-l

14、default-route originate /注入默认路由rl-rip-limport-route ospf 1 cost 3注入路由协议时手工配置开销值/ripv2 md5密文验证rijinterface g 0/0/1rl-gigabitetherneto/o/lrip authentication-mode md5 usual cipher test /ripv2 md5 密文验证, 验证密码test/ripv2自动汇总*方法1rlriprl-rip-lversion 2rl-rip-lsummary always强行启动臼动vi总*方法2rlriprl-rip-lversion 2

15、rl-rip-lint g 0/0/1rl-gigabitethernet0/0/lundo rip split-horizon 关闭相应接口下的水平分割功能/ripv2 手动vi :总rijintg 0/0/1rl-gigabitetherneto/o/lrip summary-address 其他rip配置rl-gigabitethernet0/0/lundo rip output 停止发送 rip 路由更新rl-rip-ltimers rip 20 120 60设置更新报文20s,超吋定吋器120s,垃圾收集计吋器超时60srl-rip-lpre

16、ference 90 定义rip协议的优先级,默认100,值越小优先级越高抑制更新_rip路由单播更新rlriprl-rip-lsilent-interface g 0/0/1 在各个路由接口 设置抑制接口rl-rip-lpeer 配置要接收更新的下一跳路由的接口 ip另一种抑制接口方式禁止发送rip报文rlintg 0/0/1rl-gigabitethernet0/0/lundo rip output/禁止该发送 rip 报文rl-gigabitethernet0/0/lundo rip input禁止该端口接收 rip 报文杆注:以上两条命令可以灵活地控制接口对rip

17、报文的发送和接收*注意,silent-interface 命令的优先级高于 undo rip output、undo rip input 的优先级ospf的配置rlospf 1rl-ospf-larea 0rl-osp仁lareanetwork 55 :直告网段rldis ospf interface 查看ospf接口通告是否正确rl-ospf-lpreference 110 定义 ospf 协议的优先级,默认 10/ospf区域验证rlospf 1rl-ospf-larea 1rl-ospf-l-area-authentic

18、ation-mode simple plain 123 /ospf 区域明文验证rl-osp仁lareaauthenticationmode md5 1 huawei /ospf 区域标识符为 1 的 md5 验证/ospf链路验证rlintg 0/0/1rl-gigabitethernet0/0/lospf authentication-mode md5 1 huawei /ospf 链路标识符为 1 的 md5验证袖在对血路山器配置时验证方式、标识符、口令都要保持一致/ospf抑制接口配置rlospf 1rl-ospf-lsilent-interface g 0/0/1/si

19、lent-interface 命令可以禁止接口接收、发送 ospf 报文*批量配置ospf抑制接口rlospf 1rl-ospf-lsilent-interface allrl-ospf-lundo silent-interface g 0/0/1 只允许 g0/0/l 发送 hello 报文强彳亍指定routerldrlrouter id 设置全局 routerldrlospf 1 router-id 设置 ospf 进程 1 的 routerld*注,在ospf的routerld没设置时会使用全局的routerld*注意,ospf协议的routerld必须要在整

20、个协议内保持唯一<rl>reset ospf process 修改routerld后,要使其在ospf中生效,需重置ospf进程/ospf的dr、bdr的选举rl-gigabitethernet0/0/lospfdr-priority 100将该端口的优先级修改为 100,值越大优先级越高*通过修改每个端口的ospf优先级来指定dr、bdr的选举/ospf的链路开销值修改rl-gigabitethernet0/0/lospf cost 1000/ospf 的链路开销值修改vrrp的配置rlintg 0/0/1rl-gigabitetherneto/o/lvrrp vrid 1 vi

21、rtual-ip 54/配置虚拟地址rl-gigabitetherneto/o/lvrrp vrid 1 priority 120配置优先级为 120 (默认 100)rl-gigabitetherneto/o/lvrrp vrid 1 track interface g 0/0/0 reduced 50配置端 口跟踪*注:华为设备默认开启抢占功能,所以无需配置*注:当把路由器的物理接口的ip设成跟虚拟地址一样时,该路市器就成为虚拟ip拥有者*注:这时不管该路由器的优先级是否比另一台路由器高,该路由器都会是主路由器rl-gigabitetherneto/o/lvrrp vr

22、id 1 authentication-mode md5 test 配置报文 md5 验证,验 证密码test*注意:同一 vrrp备份组的认证方式必须相同acl的配置*标准acl/acl配置r4acl 2000r4-acl-basic-2000rule 5 permit source 0肓接指定某台主机时,掩码可宜接用 0r4-acl-basic-2000rule 10 deny source any /5 跟 10 是 acl 规则号,跟思科相同 *注:2000-2999 为标准 acl*注:3000-3999 为扩展 acl/acl应用,只允许访问r4的telnetr4u

23、ser-interface vty 0 4r4-ui-vty0-4acl 2000 inbound"扩展aclr4acl 3000r4-acl-adv-3000rule permit ip source 0 destination 0r4user-interface vty 0 4r4-ui-vty0-4acl 3000 inbound和配置前缀列表配置acl过滤路山r3acl 2000r3-acl-basic-2000rule deny source 拒绝 这个目的网段的路由 r3-acl-basi

24、c-2000rule permit source anyr3riplr3-rip-lfilter-policy 2000 import*注:这样配置就会把这条路由从路由表中过滤掉配置前缀列表过滤路山r3ip ip-prefix 1 deny 25 greater-equal 25 less-equal 25 过滤 /25 这条路 由*注:也可以简写为:r3ip ip-prefix 1 deny 25r3ip ip-prefix 1 permit 0 less-equal 32 /允许其他路由将前缀路由应用到过滤

25、策略卞r3riplr3-rip-lfilter-policy ip-prefix 1 import*注:这样配宜就会把/25这条路由从路由表屮过滤掉,/24得以保留ppp认证的配置/pap认证*验证方r3ints 04/0/0r3-serial4/0/0ppp authentication-mode pap domain huawei 使用 pap 认证模式,域名 huaweir3aaar3-aaaauthentication-scheme huawei_l /仓ll建认证方案 huawei_lr3-aaa-authen-huawei_lauthenticati

26、on-mode local配置认证模式为本地认证r3qur3-aaadomain huaweiyu创建域 huaweiyur3-aaa-domain-huaweiyuauthentication-scheme huawei_l / 配置域的认证方案为 huawei_l,注意,必须和前面创建的认证方案一致r3qur3-aaalocal-user rlhuaweiyu password cipher huawei / 创建用)' rlhuaweiyu ,密码 huaweir3-aaalocal-user rlhuaweiyu service-type ppp配置这个用户用于 ppp 认证*

27、被验证方rl-serial4/0/0ppp pap local-user rlhuaweiyu password cipher huawei/chap认证*验证方r3ints 04/0/0r3-serial4/0/0ppp authentication-mode chapr3aaar3aaaauthentication-scheme huawei_lr3-aaa-authenhuawei_lauthenticatiomode localr3qur3-aaadomain huaweiyur3-aaa-domainhuaweiyuauthenticatiornscheme huawei_lr3aa

28、ar3-aaar3-aaalocal-user r1 password cipher 123r3-aaalocal-user r1 service-type ppp*被验证方rl-serial4/0/0ppp chap user r1rl-serial4/0/0ppp chap password cipher 123dhcp的配置基于接口地址池的dhcphuaweijdhcp enable 开启 dhcp 服务huaweijint g 0/0/0huawei-gigabitetherneto/o/odhcp server lease day 2/kh地址租约为 2 天huawei-gigabi

29、tetherneto/o/odhcp server dns-list 8 8指定要分配的dns地址huawei-gigabitetherneto/o/odhcp server excluded-ip-address 0/排除从.1到.10的地址huawei-gigabitetherneto/o/odhcp select interface 开启该接口的 dhcp 服务功能*注:dhcp的地址段为该接口地址的网段,网关与掩码是该接口的地址跟掩码棊于全局地址池的dhcphuaweijdhcp enablehuaw

30、eiip pool test创建地址池 testhuawei-ip-pool-testnetwork mask 24配置地址池网段huawei-ip-pool-testlease day 2 配置地址租约为2天(默认为1天) huawei-ip-pool-testdns-list 8/指定要分配的 dns 地址huawei-ip-pool-testgateway-list 54 配置要分配的网关 huawei-ip-pool-testexcluded-ip-address 50 53/

31、排除从.250 到.253的地址huaweijint g 0/0/0huawei-gigabitetherneto/o/odhcp select global 开启接口的 dhcp 功能/dhcp中继杠方法1huaweidhcp enablerijintg 0/0/2rl-gigabitethernet0/0/2dhcp select relay 启用中继rl-gigabitethernet0/0/2dhcp relay server-ip 配置要中继的 dhcp 服务器地址"方法2rldhcp server group testrl-dhcp-server-gro

32、up-testdhcp-server rijintg 0/0/0rl-gigabitetherneto/o/ldhcp select relayrl-gigabitetherneto/o/ldhcp relay server-select test*it:方法i在要配置接口少的情况下方便,要配置中继的接口多的话方法2更方便snmp的配置*开启agent服务huaweisnmp-agent 开启 snmp 服务huaweisnmp-agent sys-info version v3只使用 snmpv3 (默认 vl、v2、v3 全开启)*配置nms管理权限huaweiacl 2

33、000huawei-acl-basic-2000rule permit source 55 /只允许 管理huawei-acl-basic-2000rule deny source 55 拒绝 huaweisnmp-agent usm-user v3 user group acl 2000/k置用八组为 group,用八名 user,指 定使用acl2000杠配置向snmp agent输岀trap信息huaweis nmpage nt target-host trap-host name admi nn ms2 address udp-port 99

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论