上犹电脑信息网我们一直在努力
您的位置:上犹电脑信息网 > 设置问题 > h3c关于交换机和路由功能基本配置-h3c路由器设置

h3c关于交换机和路由功能基本配置-h3c路由器设置

作者:上犹日期:

返回目录:设置问题

交换部分:

设置下次启动的配置文件:startup saved-configuration filename

备份/恢复下次启动的文件:backup/restore stratup-configuration to/from filename

保存配置:save

查看当前视图下生效的配置:display this

查看系统启动配置文件:display startup

显示文件:dir

在屏幕上显示调试信息:terminal debugging

实验:配置设备的FTP服务

1,ftp serverenable //开启ftp服务端功能

2,local-userusername //创建用户

Service-typeftp //设置服务类型

Passwordsimple | cipher password //设置密码

3,ftp 192.168.1.1 //服务器客户端操作

4,tftpserver-add {get | put | sget} source-filename [destination-filename] [source{interface interface-type interface-number | ip source-ip-address}]

实验一:Console端口登陆方式的配置

1,认证方式为none:

1,system-view //进入系统视图

2,user-interface aux 0 //进入aux用户界面视图

3,authentication-mode none //配置console登陆方式为none

4,还有其他的可选项,例:speed、idle-timeout等等

2,认证方式为password:

1,system-view //进入系统视图

2,user-interface aux 0

2,authentication-mode password

3,set authentication password [simple|cipher] text

4,可选的其他选项同none方式一样上

3,认证方式为scheme:

1,system-view //进入系统视图

2,domaindomain-name //进入默认的isp域视图

3,local-useruser-name //创建用户名

4,password{simple | cipher } password //配置密码

5,service-typeterminal [level level] //配置服务类型

5,user-interface aux 0

6,authentication-mode scheme [command-authorization]

7,其他选项同none一样

实验二:交换机密码破解

1,关闭交换机电源后重启交换机

2,重启交换机时,点击ctrl+b键

3,在出现的列表中,选择7(即跳过当前配置)

4,然后重启即可

实验:创建vlan:

1,vlan 2

2,port gi1/0/24 //端口划到vlan2

加入vlan:

1,int gi1/0/24

2,port link-type access

3,port access vlan 2

实验三:telnet端口登陆交换机的配置:

创建一个vlan,然后配置一个ip 地址,供telnet测试

1,认证方式为none:

1,system-view //进入系统视图

2,user-interface vty 0 4

authentication-mode none

protocol inbound telnet|ssh //选择登陆的方式

3,telnetserver enable //开启telnet服务器功能

2,认证方式为password:

1,system-view //进入系统视图

2,usr-interfacevty 0 4

Authentication-modepassword

Setauthentication password 123456

3,配置其他可选的选项。例:protocol、history-commandmax-size 20等

4,同样开启telnet功能

3,认证方式为scheme:

1,system-view

2,user-interface vty 0 4

authentication-mode scheme

3,local-userguest

Passwordsimple|cipher 123456

Service-type telnet

4,配置其他可选项,并开启telnet服务功能

实验三续:SSH登陆配置:

1,ssh serverenable //开启ssh功能

3,user-interface vty 0 4

4, authen-mode scheme

5,protocolinbound ssh //设置为ssh功能

6,loca-user man //配置ssh用户

7, password simple |cipher cisco

8, service-typessh

9,rsa local-key-pair create //生成rsa密钥

10(可选):rsalocal-key-pair export ssh2 //导出rsa密钥

11(可选):rsalocal-key-pair destroy //销毁密钥

实验四:交换机接口配置与管理

1,接口激活与关闭:undoshutdown和shutdown

2,可配置双工、速率、描述等

3,开启关闭流量控制功能[undo]flow-control [enable] //在接口下或者全局。避免拥塞

4,限制端口流量:broadcast-suppression{ratio | bandwidth | pps}

5,限制单播流量 :Unicast-suppression{ratio | bandwidth | pps} //接口下

6,限制组播流量:multicast-suppression{ratio | bandwidth | pps}

7,配置环回口测试:loopback[internal | external] //接口下

8,配置环口监测:必须首先在全局下开启监测功能:loopback-detection enable

其次在接口下开启监测功能:loopback-detectionenable

Trunk口需要另外添加命令:loopback-detection control enable

9,配置端口组:port-group {manual port-group-name | aggregation agg-id}

Group-memberinterface-list //添加端口到端口组

查看端口组:displaylink-aggregation summary

10,配置端口统计信息的时间间隔:flow-intervalinterval //在接口下

11,配置允许长帧通过:jumboframeenable

12,监测电缆:virtual-cable-test //接口下

13,拷贝端口配置:copyconfiguration source --- destination ---

14,配置隔离组:port-isolateenable //接口划为隔离组

Port-group manual aa

Port-isolateenable //端口组内划为隔离组

Port-isolate uplink-port //配置为上行端口。

15,创建隔离组:port-isolategroup group-id

Port inter-list //将指定端口划入

Int gi 1/0/24

Port isolate group group-id //加入隔离端口组

16,手工创建汇聚组(类似以太通道):使用协议是lacp

Link-aggregation group agg-id mode [manual |static]

Interface bridge-aggregation interface-number //创建汇聚组

Int g1/0/24

Port link-aggregation group agg-id //端口加入汇聚组

17,配置静态lacp汇聚组:

Lacpsystem-priority system-priority 配置优先级,以小为优

Interfacebridge-aggregation interface-number //创建汇聚组

Link-aggregationgroup agg-id mode static Intg1/0/24

Portlink-aggregation group agg-id //加入汇聚组

18,配置动态lacp汇聚组:

Lacpsystem-priority number 配置优先级,以小为优

Intg1/0/24

Lacpenable 开启lacp协议

Lacpport-priority number 修改端口优先级

19,端口绑定:

user-bindmac-add ---- | ip-add --- interface-list//端口绑定

Mac地址表绑定:

Mac-address{static | dynamic } mac-add interface interface-type interface-number vlanvlan-id

20,镜像配置:1,本地端口镜像 2,远程端口镜像

1,system-view

mirroring-groupgroup-id local //创建本地镜像组

mirroring-groupgroup-id mirroring-port mirroring-port-list {both | inbound | outbound } //配置源端口,也可在接口下配置

mirroring-groupgroup-id monitor-port monitor-port-id interface intface-list //配置目标端口,也可在接口下配置

2,源交换机上的配置:

System-view

Vlan 2

Remote-probe vlan enable

Quit

Int g2/0/1

Port link-type trunk

Port trunk permit vlan 2

Quit

Mirroring-group 1 remote-source

Mirroring-group 1 mirroring-portg2/0/2

Mirroring-group 1 reflector-portg2/0/3

Mirroring-group 1 remote-probe vlan 2

中间交换机上的配置:

System-view

Vlan 2

Remote-probe vlan enable

Quit

Interface g2/0/2

Port link-type trunk

Port trunk permit vlan 2

………..

目的交换机上的配置:

System-view

Vlan 2

Remote-probe vlan enable

Quit

Int g2/0/1

Port link-type trunk

Port trunk permit vlan 2

Quit

Mirroring-group 1 remote-destination

Mirroring-group 1 monitor-port g2/0/2

Mirroring-group 1 remote-probe vlan 2

21,设置mac地址老化时间:

Mac-addresstimer aging 50

设置端口最多可学习到的mac地址数量:

Mac-addressmax-mac-count 20 //接口下

禁止端口学习mac地址:

Mac-addressmac-learning disable //接口下

配置目的mac地址更新功能:

Mac-addressaging destination-hit enable

配置端口的mac地址:

Port-macH-H-H //配置端口起始mac地址为H-H-H

查看mac地址信息:

Displaymac-address ……….

22,ip地址配置:

Intg1/0/1

Ipadd 192.168.1.1. 255.255.255.0 [sub] //sub 表示为从地址

23,IRF技术与配置:fabric/unit/FTM 华三5600、3600系列

配置交换机的fabric端口:

Fabric-portinterface-type interface-number enable //开启功能

配置交换机的unitID:

更改交换机的unit ID

Changeunit-id to unit-id | auto-numbering

修改其他交换机的unitID:

Changeunit-id unit-id1 to { unit-id2 | auto-numbering }

查看fabric配置:

Displayirf-fabrics

保存或取消设置更改:

[undo]fabric save-unit-id

配置交换机的unit name: /必做

Setunit unit-id name unit-name

配置irf fabric的fabric name //必做,且必须都相同

Sysnamename或者使用

24,自动堆叠功能fabricmember-auto-update software enable

25,IRF实验实例E:\\h3c\\IRF.pdf

26,h3c交换机的集群配置与管理:HGMPV2:NDP/NTDP/Cluster

管理交换机取消任命即为候选交换机

候选交换机可任命为管理交换机

候选交换机加入集群即为成员交换机

成员交换机移出集群即为候选交换机

配置NDP:

Ndpenable

Ndpenable interface port-list //制定端口启用NDP

Ndptimer hello 10 //修改hello时间

Ndptimer aging 10 //修改aging时间

配置NTDP:

Ntdpenable //开启ntdp功能

Ntdp[hop | timer | explore ] //修改参数

配置cluster:

Clusterenable //开启cluster功能

Cluster //进入集群视图

Ip-pool管理地址掩码 //配置集群ip地址范围

Buildname //创建集群,并命名

其他可选参数:holdtime/timer /……

Quit //推出群集视图

Auto-build[recover] //自动创建集群

H3c交换机集群内外交互配置:

System-view

Cluster

ftp-serverip-address //配置ftp服务器地址

tftp-serverip-address //配置tftp服务器地址

logging-host ip-address //配置日志主机

snmp-host ip-address //配置网管主机

成员交换机访问集群服务器的配置

ftpcluster //通过管理交换机访问ftp服务器

tftpcluster get source-file [ destination-file] //从tftp服务器下载文件

tftpcluster put source-file [ destination-file] //从tftp服务器上传文件

H3C交换机集群内的操作

Add-member[ member-number | mac-address] //添加成员

Delete-member…..

Rebootmember…..

Clusterswitch ……

Tracemac{ by-mac….. | by-ip……}………

27,STP基本配置:

1,stpenable //开启stp特性

2, stp disable/ undo stp enable //关闭stp特性

3, stp mode [stp | rstp | mstp] //stp的工作模式

4, 其他可选项:stp priority / stp edge-port enable…..

28,端口接入控制方式:1,基于端口(一成则百成)2,基于MAC(各成各自的)

802.1X基本配置:

1,dot1x //开启全局802.1x

2,dot1xinterface f0/0 //开启端口的802.1x特性

3,local-userman

Passwordsimple | cipher password

Service-typelan-access

路由部分:

1,DNS配置:

1,ip host hostname ip-address //配置静态域名解析表中主机名和对应地址

2,dns resolve //开启动态域名解析功能

3,dns server ip-address //配置制定域名服务器

4,dns domain domain-name //配置域名后缀

5,dns proxy enable //开启DNS代理功能

6,查看命令: display ip host、display dns server、、、、、、、

2,DHCP配置:

1,dhcp enable //开启DHCP功能

2,dhcp server ip-pool poolname //创建dhcp地址池

Network 10.1.1.0 {mask-length| mask }

Gateway-list ip-address

……….

3,查看配置:display dhcpserver {free-ip | statistics}…..

DHCP RELAY配置:在中继上的配置

1,dhcp enable //开启dhcp功能

2,dhcp relay server-group gro-id ipip-add//配置dhcp服务器组中dhcp服务器ip地址

3,in e1/1 //进入靠近dhcp服务器端的接口

Dhcp select relay //配置接口工作在dhcp中继模式

Dhcp relay server-selectgroup-id //配置接口与dhcp组关联

3,IPV6配置:

1,ipv6 //开启ipv6功能

2,ipv6 address fe80::1 link-local //配置本地地址

3,ipv6 address 2001::1/64 //配置全球单播地址

4,各类路由默认优先级:以小为优

直连路由 0

Ospf内部路由 10

静态路由 60

Rip路由 100

Ospf外部路由 150

BGP路由 256

查看路由表:display iprouting-table {ip-address | statistics}

5,vlan间路由:

单臂路由:

1,路由器配置:inter g0/0/1.1

Ipadd 1.1.1.1 255.255.255.0

Vlan-type dot1q vid2

2,交换机配置:int g0/0/1

Link-typetrunk

Linktrunk permit vlan all

三层交换:int vlan 2

Ip add 1.1.1.1255.255.255.0

配置vlan ip地址为网关地址

6,静态路由配置:

Ip route-static dest-add {mask |mask-length }{gateway-address | interface-type interface-name} [preferencepreference-value]

7,RIP:

1,RIP定时器:

1,update定时器:30s

2,timeout定时器:180s,类似思科中无效计时器

3,garbage-collect定时器:120s,类似刷新定时器

2,RIP基本配置:

1,rip [process-id] //创建rip进程

network network-address //制定网段接口上时能rip

silent-interface{all | interface-type interface-number} //使接口为抑制状态

version { 1| 2} //制定rip版本

undo summary //v2下关闭自动汇总功能

preference //修改rip优先级

timers {timeout |garbage-collection | period update} //修改定时器值

import-route {bgp |direct | isis | rip | ospf | static} //引入路由,

2,int f0/0

Ripspilt-horizon //开启水平分割功能

Rip poison-reverse//开启毒性逆转功能

Rip triggered //开启触发更新

Ripauthentication-mode {md5 {rfc2082 key-string key-id | rfc2453 ,ey-string} |simple password } //配置ripv2认证功能

Rip input //允许接口接收rip报文

Rip output //允许接口发送rip报文

Rip metricin //接口接收rip报文时增加的路由权值

Rip metricout //接口发送rip报文时增加的路由权值

Rip version {1 |2}{broadcast | multicast} //修改接口模式

Rip summary-address10.1.1.0 8 //手工汇总

8,ospf基本配置:

1,router id ip-address //配置router-id

2,ospf [process-id] //启动ospf进程

Area area-id //配置ospf区域

Networknetwork-add wildcard-mask //宣告网段

3,reset ospf[process-id] //重置ospf进程

4,int e0/0

Ospf dr-prioritypriority //配置ospf接口优先级

Ospf cost value //配置接口cost

5,display iprouting-table //显示路由表

Display ospf peer //显示邻居表

Display ospf lsdb //显示链路状态数据库

Display ospf brief | interface | error …..

Debugging terminal //开启调试

Debugging ospf event | lsa | packet | spf……

9,ACL基本配置:

1,ACL的标示:

基本的 2000-2999

扩展的 3000-3999

基于二层的 4000-4999

用户自定义 5000-5999

2,firewall enable //启动防火墙功能

Firewall default {permit | deny} //设置防火墙默认过滤方式

3,配置基本acl

Acl number 2000-2999

Rule[rule-id] {deny | permit} [fragment | logging |source {source-addrsour-wildcast | any} | time-range time-name ]

4,配置高级acl

Acl number 3000-3999

Rule[rule-id] {deny | permit } protocol [destination {dest-addr dest-wildcard | any} |destination-port operator port1 [port2] established | fragment | source{sour-addr sour-wildcard | any } |source-port operator port1 [port2] | time-rangetime-name]

5,配置二层acl

Acl number 4000-4999

Rule[rule-id] {deny |permit } [cos vlan-pri | dest-mac dest-addr dest-mask | lsaplsap-code lsap-wildcard |source-mac sour-addr source-mask | time-rangetime-name]

6,在接口上应用acl

Int e0/0

Firewallpacket-filter { acl-number | name acl-name} {inbound |outbound}

7,acl规则的匹配顺序

Acl numberacl-number [match-order {auto |config} ]

Auto:按照地址范围小的规则被优先匹配

Config:按照用户配置规则的先后顺序进行规则匹配

8,acl包过滤显示与调试

Displayfirewall-statics {all |interface interface-type interface-number}

Display firewall acl{acl-number |all}

Resetfirewall-statistics {all |interface interface-type interface-number}

Rest acl counter{acl-number |all}

10,NAT基本配置:

1,配置acl匹配流量

2,配置地址池: nataddress-group group-number start-addr end-addr

3,配置地址转换: natoutbound acl-number address-group group-number [no-pat]

11,NATPT配置:

1,配置acl匹配流量

2,配置地址池: nataddress-group group-number start-addr end-addr

3,配置地址转换: natoutbound acl-number address-group group-number

NO-APT:标示为禁止地址转换

12,EasyIP配置:

1,配置ACL匹配流量

2.配置地址转换: natoutbound acl-number

13,NATSERVER配置:公网->内网

1,natserver protocol pro-type global global-addr [global-port] inside host-addr[host-port]

14,HDLC基本配置:

1,ints0/1/0

Link-protocolhdlc //封装为HDLC

Timerhold seconds //设置keepalive轮询时间间隔

15,PPP基本配置:

PAP配置:支持双向认证

1,主验证方:

Local-userr1

Passwordsimple cisco

Service-typeppp

Ints0/1/0

Pppauthentication-mode pap

2,被验证方:

Ints0/1/0

Pppauthentication-mode pap

Ppppap local-user r1 password simple cisco

CHAP配置:支持双向认证

1,主验证方:

Local-userr1

Passwordsimple cisco

Service-typeppp

Ints0/1/0

Pppauthentication-mode chap

Pppchap user r2

2,被验证方:

Int s0/1/0

Pppauthentication-mode chap

Pppchap user r1

Pppchap password simple cisco

PPPMP配置:

1,virtual-template:

Intvirtual-template 1

Ipadd 1.1.1.1 255.255.255.0

Ints0/1/0

Pppmp virtual-template 1

2,将用户名和虚拟模板接口关联:

Pppmp user username bind virtual-template number

Intvirtual-template 1

Pppmp binding authentication

Ints0/1/0

Pppmp

3,MP-Group:

Intmp-group 1

Ipadd 1.1.1.1 255.255.255.0

Ints0/1/0

Pppmp mp-group 1

16,帧中继交换:

DTE:

ints0/0

Link-protocolfr

Frmap ip Dip-addr Ldlci-number [broadcast | nonbroadcast]

Frinterface-type dte

Frlmi-type {ansi | nonstandard | q933a}

Ints0/0.1 [p2p | p2mp]

DCE:

Frswitching //启动功能

Ints0/0/

Frdlci dlci-number //标示本地dlci

Frinterface-type dce

Frdlci-switch in-dlci interface interfa-type interfa-number dlci out-dlci

Displayfr interface | map-info |lmi-info…. //查看信息

Ripv1广播更新,但是fr不支持,所以需要手动添加对等体

Rip

Peer1.1.1.1

相关阅读

关键词不能为空
极力推荐

电脑蓝屏_电脑怎么了_win7问题_win10问题_设置问题_文件问题_上犹电脑信息网

关于我们