华为配置实例.docx

上传人:b****3 文档编号:27172067 上传时间:2023-06-27 格式:DOCX 页数:24 大小:33.61KB
下载 相关 举报
华为配置实例.docx_第1页
第1页 / 共24页
华为配置实例.docx_第2页
第2页 / 共24页
华为配置实例.docx_第3页
第3页 / 共24页
华为配置实例.docx_第4页
第4页 / 共24页
华为配置实例.docx_第5页
第5页 / 共24页
点击查看更多>>
下载资源
资源描述

华为配置实例.docx

《华为配置实例.docx》由会员分享,可在线阅读,更多相关《华为配置实例.docx(24页珍藏版)》请在冰豆网上搜索。

华为配置实例.docx

华为配置实例

HessenwasrevisedinJanuary2021

 

华为配置实例

同网段内配置基于接口地址池的DHCP服务器示例

组网需求

如所示,某企业有两个处于同一网络内的办公室,为了节省资源,两个办公室内的主机由SwitchA作为DHCP服务器统一分配IP地址。

办公室1所属的网段为/24,主机都加入VLAN10,办公室1使用DNS服务和NetBIOS服务,地址租期30天;办公室2所属的网段为/24,主机都加入VLAN11,办公室2不使用DNS服务和NetBIOS服务,地址租期20天。

配置思路

基于VLANIF接口地址池的DHCP服务器的配置思路如下:

1.在SwitchA上创建两个接口地址池并配置地址池相关属性,实现DHCP服务器可以根据不同需求,从不同的接口地址池中选择合适的IP地址及其配置参数分配给办公室主机。

2.在SwitchA上配置VLANIF接口基于接口地址池的地址分配方式,实现DHCP服务器从基于接口的地址池中选择IP地址分配给办公室主机。

操作步骤

1.使能DHCP服务

2.system-view

3.[HUAWEI]sysnameSwitchA

[SwitchA]dhcpenable

4.配置接口加入VLAN

#配置GE0/0/1接口加入VLAN10。

[SwitchA]vlanbatch10to11

[SwitchA]interfacegigabitethernet0/0/1

[SwitchA-GigabitEthernet0/0/1]porthybridpvidvlan10

[SwitchA-GigabitEthernet0/0/1]porthybriduntaggedvlan10

[SwitchA-GigabitEthernet0/0/1]quit

#配置GE0/0/2加接口入VLAN11。

[SwitchA]interfacegigabitethernet0/0/2

[SwitchA-GigabitEthernet0/0/2]porthybridpvidvlan11

[SwitchA-GigabitEthernet0/0/2]porthybriduntaggedvlan11

[SwitchA-GigabitEthernet0/0/2]quit

5.配置VLANIF接口IP地址

#配置VLANIF10接口地址。

[SwitchA]interfacevlanif10

[SwitchA-Vlanif10]ipaddress24

[SwitchA-Vlanif10]quit

#配置VLANIF11接口地址。

[SwitchA]interfacevlanif11

[SwitchA-Vlanif11]ipaddress24

[SwitchA-Vlanif11]quit

6.使能VLANIF接口地址池

#配置VLANIF10接口下的客户端从接口地址池中获取IP地址。

[SwitchA]interfacevlanif10

[SwitchA-Vlanif10]dhcpselectinterface

[SwitchA-Vlanif10]quit

#配置VLANIF11接口下的客户端从接口地址池中获取IP地址。

[SwitchA]interfacevlanif11

[SwitchA-Vlanif11]dhcpselectinterface

[SwitchA-Vlanif11]quit

7.配置接口地址池的DNS服务和NetBIOS服务

#配置VLANIF10接口地址池下的DNS服务和NetBIOS服务。

[SwitchA]interfacevlanif10

[SwitchA-Vlanif10]dhcpserverdomain-name

[SwitchA-Vlanif10]dhcpserverdns-list

[SwitchA-Vlanif10]dhcpservernbns-list

[SwitchA-Vlanif10]dhcpserverexcluded-ip-address

[SwitchA-Vlanif10]dhcpserverexcluded-ip-address

[SwitchA-Vlanif10]dhcpservernetbios-typeb-node

[SwitchA-Vlanif10]quit

8.配置接口地址池中地址租用期限

#配置VLANIF10接口地址租用期限为30天。

[SwitchA]interfacevlanif10

[SwitchA-Vlanif10]dhcpserverleaseday30

[SwitchA-Vlanif10]quit

#配置VLANIF11接口地址租用期限为20天。

[SwitchA]interfacevlanif11

[SwitchA-Vlanif11]dhcpserverleaseday20

[SwitchA-Vlanif11]quit

9.验证配置结果

在SwitchA上使用displayippool命令用来查看接口地址池配置情况。

[SwitchA]displayippoolinterfacevlanif10

Pool-name:

Vlanif10

Pool-No:

0

Lease:

30Days0Hours0Minutes

Domain-name:

DNS-server0:

NBNS-server0:

Netbios-type:

b-node

Position:

InterfaceStatus:

Unlocked

Gateway-0:

Mask:

VPNinstance:

--

-----------------------------------------------------------------------------

StartEndTotalUsedIdle(Expired)ConflictDisable

-----------------------------------------------------------------------------

2531250(0)02

-----------------------------------------------------------------------------

[SwitchA]displayippoolinterfacevlanif11

Pool-name:

Vlanif11

Pool-No:

1

Lease:

20Days0Hours0Minutes

Domain-name:

-

DNS-server0:

-

NBNS-server0:

-

Netbios-type:

-

Position:

InterfaceStatus:

Unlocked

Gateway-0:

Mask:

VPNinstance:

--

-----------------------------------------------------------------------------

StartEndTotalUsedIdle(Expired)ConflictDisable

-----------------------------------------------------------------------------

2533250(0)00

-----------------------------------------------------------------------------

配置文件

SwitchA的配置文件

#

sysnameHUAWEI

#

vlanbatch10to11

#

dhcpenable

#

interfaceVlanif10

ipaddress

dhcpselectinterface

dhcpserverexcluded-ip-address

dhcpserverleaseday30hour0minute0

dhcpserverdns-list

dhcpservernetbios-typeb-node

dhcpservernbns-list

dhcpserverdomain-name

#

interfaceVlanif11

ipaddress

dhcpselectinterface

dhcpserverleaseday20hour0minute0

#

interfaceGigabitEthernet0/0/1

porthybridpvidvlan10

porthybriduntaggedvlan10

#

interfaceGigabitEthernet0/0/2

porthybridpvidvlan11

porthybriduntaggedvlan11

#

return

headerDefinetheloginbanner

httpHTTP

hwtacacsSetthestatusoftheHWTACACS(HuaweiTerminal

AccessControllerAccessControlSystem)service

hwtacacs-serverSetHWTACACSserver

icmpSpecifyICMPconfigurationinformation

icmp-replyEnableICMPreplyfast

igmp-snoopingSpecifyparametersforIGMP-Snooping

info-centerSpecifyinformationcenterconfiguration

information

interfaceSpecifytheinterfaceconfigurationview

ipIPinformation

ipv6EnableIPv6functionality

l2-topologyLayer2topology

l2protocol-tunnelLayer2protocoltunnel

lacpLinkaggregationcontrolprotocol

lldpLinkLayerDiscoveryProtocol

load-balanceSpecifyloadbalancemode

loopback-detectLoopbackdetectfunction

mac-addressMac-address

mac-authenMACauthenticateconfigureinformation

mac-forced-forwardingMac-ForcedForwarding

mac-learningMAClearning

mac-limitMAClimit

mac-spoofing-defendMACspoofingdefend

madMulti-activedetection

management-portManagementport

matchedIsCommandcanbematchedbyuppertemplate

mld-snoopingSpecifyparametersforMLD-Snooping

monitor-linkMonitorlinkconfigurationinformation

multicastMulticastconfigurationinformation

napNAPprotocol

ndNeighbordiscovery

nqaNetworkQualityAnalysis(NQA)

nqa-jitterSwitchNQAjitterversion

nqa-serverSpecifyNQAechoserver

ntp-serviceSpecifyNTP(NetworkTimeProtocol)configuration

information

oam-mgrOam-mgrview

observe-portConfigureobserveportfeature

pingPingfunction

poePoweroverEthernet

portPort

port-groupPort-group

port-isolatePortisolate

pppoePPPOE

qosQoSconfiguration

radius-serverAddordeleteRADIUSservertemplate

rmonSpecifyRMONconfiguration

route-policyRoute-policy

route-policy-changeSpecifyroutepolicychangeparameter

routerConfigurerouterinformation

rpsSetRPSstatus

rrppRapidringprotectionprotocol

rsaSpecifyRSAmoduleconfigurationinformation

saviSourceAddressValidationImprovement

scpSetSCPserver

screen-widthSetscreenwidth

sepSmartethernetprotection

setSetthemodeofpowermanagement

sflowSFlowmodule

sftpSetSFTPserviceattribute

slaveBackupswitchfrommastertoslave

sleepSetdevicetosleepmode

smart-linkSmartlinkconfigurationinformation

snmp-agentSpecifySNMP(SimpleNetworkManagementProtocol)

configurationinformation

sshSettheSSH(secureshell)configurationattribute

sslSecuritysocketlayer

stackStack

stack-portStackport

startupStartupconfiguration

stelnetSetStelnetserviceattribute

stpSpecifySpanningTreeProtocol(STP)configuration

information

suppressionSuppression,includebroadcast-suppression,

multicast-suppressionandunicast-suppression

sys-netidSystem-netid

sysnameSpecifythehostname

tcpSpecifyTCP(TransmissionControlProtocol)

configurationinformation

telnetSetthestatusoftheTelnetservice

temperatureDevicetemperature

tftpEstablishaTFTPconnection

tftp-serverTFTPserver

time-rangeSpecifytime-rangeconfigurationinformation

traceTraceroute(switch)tohostonDataLinkLayer

trafficSpecifytrafficconfigurationinformation

traffic-filterFilterpacketsbasedonacl

traffic-limitLimittherateofthepacketsbasedonacl

traffic-mirrorMirrorpacketsbasedonacl

traffic-policyApplyspecifictrafficpolicy

traffic-redirectRedirectpacketsbasedonacl

traffic-remarkRemarkpacketsbasedonacl

traffic-secureFilterpacketsbasedonacl

traffic-statisticCountpacketsbasedonacl

transceiverTransceiver

user-bindUserbind

user-interfaceConfiguretheuserterminalinterface

vlanVirtualLAN

voice-vlanVoiceVLAN

[xinhao]undovl

[xinhao]undovlan10

[xinhao]

[xinhao]

[xinhao]qu

[xinhao]quit

Jan14200023:

57:

30xinhaoDS/4/DATASYNC_CFGCHANGE:

OID.configurationshavebeenchanged.Thecurrentchangenumberis23,thecha

ngeloopcountis0,andthemaximumnumberofrecordsis

di

displayvlan

Thetotalnumberofvlansis:

2

--------------------------------------------------------------------------------

U:

Up;D:

Down;TG:

Tagged;UT:

Untagged;

MP:

Vlan-mapping;ST:

Vlan-stacking;

#:

ProtocolTransparent-vlan;*:

Management-vlan;

--------------------------------------------------------------------------------

VIDTypePorts

--------------------------------------------------------------------------------

1commonUT:

GE0/0/1(D)GE0/0/2(D)GE0/0/3(D)GE0/0/4(D)

GE0/0/5(D)GE0/0/6(D)GE0/0/7(D)GE0/0/8(D)

GE0/0/9(D)GE0/0/10(D)GE0/0/11(D)GE0/0/12(D)

GE0/0/13(D)GE0/0/14(D)GE0/0/15(D)GE0/0/16(D)

GE0/0/17(D)GE0/0/18(D)GE0/0/19(D)GE0/0/20(D)

GE0/0/21(D)GE0/0/22(D)GE0/0/23(D)GE0/0/24(D)

GE0/0/25(D)GE0/0/26(D)GE0/0/27(D)GE0/0/28(D)

757commonUT:

GE0/0/24(D)

VIDStatusPropertyMAC-LRNStatisticsDescription

--------------------------------------------------------------------------------

1enabledefaultenabledisableVLAN0001

757enabledefaultenabledisableVLAN0757

save

save

Thecurrentconfigurationwillbewrittentothedevice.

Areyousuretocontinue[Y/N]y

Nowsavingthecurrentconfigurationtotheslot0.

Jan14200023:

57:

55xinhao%%01CFM/4/SAVE(l)[1]:

TheuserchoseYwhendeciding

whethertosavetheconfigurationtothedevice.

Savetheconfigurationsuccessfully.

ssy

sys

system-view

Entersystemview,returnuserviewwithCtrl+Z.

[xinhao]int

[xinhao]interfaceg

[xinhao]interfaceGigabitEthernet0/0/1

[xinhao-GigabitEthernet0/0/1]port

[xinhao-GigabitEthernet0/0/1]porthy

[xinhao-GigabitEthernet0/0/1]porthybridpvid

[xinhao-GigabitEthernet0/0/1]porthybridpvidvl

[xinhao-GigabitEthernet0/0/1]porthybridpvid

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 解决方案 > 其它

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1