null51CTO博客 - 凯发娱乐

null51CTO博客

2019-03-06 09:58:23 | 作者: 静珊 | 标签: | 浏览: 1080

华为S5700系列交流机,是咱们项目顶用的较多的一款,其间24与48口运用较多。现在将华为交流机的一些常用装备收拾一下,进行记载。如有过错,请纠正。


1 答应telnet(长途登录)

答应华为交流机能telnet,设置暗码为Admin@123

telnet server en

#

aaa

authentication-scheme default

authorization-scheme default

accounting-scheme default

domain default

domain default_admin


local-user huawei password cipher Admin@123

local-user huawei privilege level 15

local-user huawei service-type telnet terminal


local-user admin password cipher Admin@123

local-user admin service-type http


#


user-interface con 0

authentication-mode password

set authentication password cipher Admin@123


user-interface vty 0 4

protocol inbound telnet

authentication-mode aaa

user-interface vty 16 20

#


华为S5720S交流机长途登录

telnet server enable


aaa

 authentication-scheme default

 authentication-scheme radius

  authentication-mode radius

 authorization-scheme default

 accounting-scheme default

 local-aaa-user password policy administrator

  password expire 0

 domain default

  authentication-scheme radius

  radius-server default

 domain default_admin

  authentication-scheme default

 local-user admin password irreversible-cipher Admin@123

 local-user admin privilege level 15

 local-user admin service-type terminal http

 local-user huawei password irreversible-cipher Admin@123

 local-user huawei privilege level 15

 local-user huawei service-type telnet terminal


user-interface con 0

authentication-mode password

set authentication password cipher Admin@123


user-interface vty 0 4

protocol inbound telnet

authentication-mode aaa

user-interface vty 16 20

2 创立VLAN


为交流机区分VLAN1001,VLAN1002,

设置vlan1001,接口IP地址为172.16.1.254(即网关地址),子网掩码为255.255.255.0

将g0/0/1~g0/0/24装备为vlan1001

避免arp***


vlan 1001

interface vlan 1001

ip addr 172.16.1.254 24



arp anti-attack gateway-duplicate enable

arp anti-attack rate-limit enable

arp-miss anti-attack rate-limit enable



port-group group1

group-member g0/0/1 to g0/0/24

port link-type access

port default vlan 1001

loopback-detect enable

arp anti-attack rate-limit enable

arp-miss anti-attack rate-limit enable

quit


批量将多个端口添加到Access

port-group group-member  GigabitEthernet0/0/17  to GigabitEthernet0/0/22

port link-type access

port default vlan 2006

quit

3 将多个端口添加到Trunk


将25~44端口区分为Trunk端口


port-group group2

group-member g0/0/25 to g0/0/44

port link-type trunk

port trunk allow-pass vlan 2 to 4094

loopback-detect enable

quit


# 批量将1~16端口添加到Trunk

port-group group-member  GigabitEthernet0/0/1  to GigabitEthernet0/0/16

port link-type trunk

port trunk allow-pass vlan 2 to 4094

quit


4 创立链路聚合端口


将45、46创立链路聚合1,运用RJ45

将47、48创立链路聚合2,运用光纤


clear configuration inte g0/0/45

clear configuration inte g0/0/46

clear configuration inte g0/0/47

clear configuration inte g0/0/48


interface Eth-Trunk1

port link-type trunk

port trunk allow-pass vlan 2 to 4094

mode lacp


interface Eth-Trunk2

port link-type trunk

port trunk allow-pass vlan 2 to 4094

mode lacp



interface GigabitEthernet0/0/45

eth-trunk 1


interface GigabitEthernet0/0/46

eth-trunk 1



interface GigabitEthernet0/0/47

eth-trunk 2

combo-port fiber


interface GigabitEthernet0/0/48

eth-trunk 2

combo-port fiber


【阐明】每个端口或许需求履行undo shutdown以激活端口。


5 VLAN端口重新装备为Trunk


原装备如下:

interface GigabitEthernet0/0/17

port link-type access

port default vlan 128


将g0/0/17端口装备为Trunk端口指令

undo port default vlan

undo port link-type


port link-type trunk

port trunk allow-pass vlan all



6 Trunk端口重新装备为VLAN


原装备如下

interface GigabitEthernet0/0/11

port link-type trunk

port trunk allow-pass vlan 2 to 4094


将g0/0/11端口装备为VLAN140指令

undo port trunk allow-pass vlan all

port trunk allow-pass vlan 1

port link-type access

port default vlan 140




7 在交流机上装备DHCP Server


(1)vlan2002的网关地址是172.18.92.254,DHCP地址池中扫除172.18.92.200~252、172.18.92.253、DHCP的地址租约是1小时、DNS的地址是172.18.96.1

vlan batch  2001 to 2003


ip pool vlan2002

gateway-list 172.18.92.254

network 172.18.92.0 mask 255.255.255.0

excluded-ip-address 172.18.92.200 172.18.92.253

lease day 0 hour 1 minute 0

dns-list 172.18.96.1

#

interface Vlanif2002

ip address 172.18.92.254 255.255.255.0

dhcp select global

#



8 在交流机中指定WDS效劳


假如网络中有WDS(Windows布置效劳),假如要为各个VLAN,答应从交流机经过DHCP取得IP地址,而且能从运用其他VLAN中的WDS布置体系(网络拓扑如图所示),则华为交流机DHCP能够进行如下的装备。

本示例装备了VLAN2001~VLAN2006,其间效劳器归于VLAN2006,为VLAN2001~2006装备DHCP,而且答应这些VLAN中的计算机,能运用172.18.96.1的WDS装置、布置体系。其间172.18.96.1是Windows Server 2016 数据中心版。


sysname HW5700

#

vlan batch 2001 to 2006

#

ip pool vlan2001

gateway-list 172.18.91.254

network 172.18.91.0 mask 255.255.255.0

dns-list 172.18.96.1

next-server 172.18.96.1

option 66 ip-address 172.18.96.1

option 67 ascii Boot\x86\wdsnbp.com

bootfile Boot\wdsnbp.com

#


interface Vlanif2001

description 1_JiFang

ip address 172.18.91.254 255.255.255.0

dhcp select global

#

#

interface Vlanif2006

description Server

ip address 172.18.96.254 255.255.255.0

dhcp select global

#



9 指定DHCP效劳器(在交流机上装备DHCP中继)


【阐明】:在交流机上指定DHCP中继(DHCP效劳器是Windows Server中的DHCP)这是在前期华为或华三交流机上的装备,详细那个类型我记不清了,现在这些装备我基本上现已不用了,仅仅在这收集收拾一下。

#

dhcp enable

#

dhcp server group dhcpgroup1

dhcp-server 172.30.5.3 0

dhcp-server 172.30.5.15 1


#

interface Vlanif2052

ip address 172.28.52.254 255.255.255.0

dhcp select relay

dhcp relay server-select dhcpgroup1

#


以下是摘抄的华为官方协助文档内容

# 在接口下使能DHCP中继功用。

[SwitchA] dhcp enable //使能DHCP效劳,缺省未使能

[SwitchA] interface vlanif 100

[SwitchA-Vlanif100] ip address 10.10.20.1 24

[SwitchA-Vlanif100] dhcp select relay //使能DHCP中继功用,缺省未使能

[SwitchA-Vlanif100] dhcp relay server-ip 192.168.20.2 //装备DHCP中继署理的DHCP效劳器的IP地址

[SwitchA-Vlanif100] quit


10 装备静态路由


ip route-static 0.0.0.0 0.0.0.0 172.18.96.253

ip route-static 172.18.0.0 255.255.0.0 172.18.96.251

ip route-static 172.30.30.0 255.255.255.0 172.18.96.250


11 装备SNMP

snmp-agent

snmp-agent local-engineid Admin@123

snmp-agent community write cipher Admin@123

snmp-agent sys-info version all


12 为交流机装备堆叠形式

在本示例中将2台S6720S-26Q-EI-24S的交流机,运用40GB QSFP电缆以“堆叠”方法衔接在一起。装备为堆叠形式后,两台交流机相当于“一台”交流机运用。如下图所示,这是堆叠电缆以及两台交流机的衔接方法。在本示例中,运用两条40GB的QSFP电缆将两台交流机的第1个、第2个40GE穿插衔接在一起(交流机1的40GE端口1衔接交流机2的40GE端口2,交流机1的40GE端口2衔接交流机2的40GE端口1)。

image.png


13 铲除堆叠端口装备

在装备交流机堆叠时,假如过错装备了交流机的堆叠端口,需求将端口铲除装备,能够选用如下的指令。

例如将交流机的G1/0/25与G1/0/26添加到stack-port 1/1,指令如下:

 

interface stack-port 1/1

 port interface GigabitEthernet1/0/25 enable

 port interface GigabitEthernet1/0/26 enable

 

interface stack-port 1/2

 port interface GigabitEthernet1/0/27 enable

 port interface GigabitEthernet1/0/28 enable

 

假如要铲除这个装备,需求履行如下的装备:

 

interface stack-port 1/1

shutdown interface GigabitEthernet1/0/25

shutdown interface GigabitEthernet1/0/26

undo port interface GigabitEthernet1/0/25 enable

undo port interface GigabitEthernet1/0/26 enable

 

interface GigabitEthernet1/0/25

undo shutdown

interface GigabitEthernet1/0/26

undo shutdown

 



版权声明
本文来源于网络,版权归原作者所有,其内容与观点不代表凯发娱乐立场。转载文章仅为传播更有价值的信息,如采编人员采编有误或者版权原因,请与我们联系,我们核实后立即修改或删除。

猜您喜欢的文章