1、华为5700配置实例同网段内配置基于接口地址池的DHCP效劳器例如组网需求如图1所示,某企业有两个处于同一网络内的办公室,为了节省资源,两个办公室内的主机由SwitchA作为DHCP效劳器统一分配IP地址。办公室1所属的网段为10.1.1.0/24,主机都参加VLAN10,办公室1使用DNS效劳和NetBIOS效劳,地址租期30天;办公室2所属的网段为10.1.2.0/24,主机都参加VLAN11,办公室2不使用DNS效劳和NetBIOS效劳,地址租期20天。配置思路基于VLANIF接口地址池的DHCP效劳器的配置思路如下:1.在SwitchA上创立两个接口地址池并配置地址池相关属性,实现DH
2、CP效劳器可以根据不同需求,从不同的接口地址池中选择适宜的IP地址及其配置参数分配给办公室主机。2.在SwitchA上配置VLANIF接口基于接口地址池的地址分配方式,实现DHCP效劳器从基于接口的地址池中选择IP地址分配给办公室主机。操作步骤1.使能DHCP效劳2. system-view3. HUAWEI sysname SwitchASwitchA dhcp enable4.配置接口参加VLAN#配置GE0/0/1接口参加VLAN10。SwitchA vlan batch 10 to 11SwitchA interface gigabitethernet 0/0/1SwitchA-Gig
3、abitEthernet0/0/1 port hybrid pvid vlan 10SwitchA-GigabitEthernet0/0/1 port hybrid untagged vlan 10SwitchA-GigabitEthernet0/0/1 quit#配置GE0/0/2加接口入VLAN11。SwitchA interface gigabitethernet 0/0/2SwitchA-GigabitEthernet0/0/2 port hybrid pvid vlan 11SwitchA-GigabitEthernet0/0/2 port hybrid untagged vlan
4、11SwitchA-GigabitEthernet0/0/2 quit5.配置VLANIF接口IP地址#配置VLANIF10接口地址。SwitchA interface vlanif 10SwitchA-Vlanif10 ip address 10.1.1.1 24SwitchA-Vlanif10 quit#配置VLANIF11接口地址。SwitchA interface vlanif 11SwitchA-Vlanif11 ip address 10.1.2.1 24SwitchA-Vlanif11 quit6.使能VLANIF接口地址池#配置VLANIF10接口下的客户端从接口地址池中获取I
5、P地址。SwitchA interface vlanif 10SwitchA-Vlanif10 dhcp select interfaceSwitchA-Vlanif10 quit#配置VLANIF11接口下的客户端从接口地址池中获取IP地址。SwitchA interface vlanif 11SwitchA-Vlanif11 dhcp select interfaceSwitchA-Vlanif11 quit7.配置接口地址池的DNS效劳和NetBIOS效劳#配置VLANIF10接口地址池下的DNS效劳和NetBIOS效劳。SwitchA interface vlanif 10Switch
6、A-Vlanif10 dhcp server domain-name huawei.SwitchA-Vlanif10 dhcp server dns-list 10.1.1.2SwitchA-Vlanif10 dhcp server nbns-list 10.1.1.3SwitchA-Vlanif10 dhcp server excluded-ip-address 10.1.1.2SwitchA-Vlanif10 dhcp server excluded-ip-address 10.1.1.3SwitchA-Vlanif10 dhcp server netbios-type b-nodeSwi
7、tchA-Vlanif10 quit8.配置接口地址池中地址租用期限#配置VLANIF10接口地址租用期限为30天。SwitchA interface vlanif 10SwitchA-Vlanif10 dhcp server lease day 30SwitchA-Vlanif10 quit#配置VLANIF11接口地址租用期限为20天。SwitchA interface vlanif 11SwitchA-Vlanif11 dhcp server lease day 20SwitchA-Vlanif11 quit9.验证配置结果在SwitchA上使用display ip pool命令用来查看
8、接口地址池配置情况。SwitchA display ip pool interface vlanif10 Pool-name : Vlanif10 Pool-No : 0 Lease : 30 Days 0 Hours 0 Minutes Domain-name : huawei. DNS-server0 : 10.1.1.2 NBNS-server0 : 10.1.1.3 Netbios-type : b-node Position : Interface Status : Unlocked Gateway-0 : 10.1.1.1 Mask : 255.255.255.0 VPN inst
9、ance : - - Start End Total Used Idle(Expired) Conflict Disable - 10.1.1.1 10.1.1.254 253 1 250(0) 0 2 -SwitchA display ip pool interface vlanif11 Pool-name : Vlanif11 Pool-No : 1 Lease : 20 Days 0 Hours 0 Minutes Domain-name : - DNS-server0 : - NBNS-server0 : - Netbios-type : - Position : Interface
10、Status : Unlocked Gateway-0 : 10.1.2.1 Mask : 255.255.255.0 VPN instance : - - Start End Total Used Idle(Expired) Conflict Disable - 10.1.2.1 10.1.2.254 253 3 250(0) 0 0 - 配置文件SwitchA的配置文件# sysname HUAWEI# vlan batch 10 to 11#dhcp enable#interface Vlanif10 ip address 10.1.1.1 255.255.255.0 dhcp sele
11、ct interface dhcp server excluded-ip-address 10.1.1.2 10.1.1.3 dhcp server lease day 30 hour 0 minute 0 dhcp server dns-list 10.1.1.2 dhcp server netbios-type b-node dhcp server nbns-list 10.1.1.3 dhcp server domain-name huawei.#interface Vlanif11 ip address 10.1.2.1 255.255.255.0 dhcp select interf
12、ace dhcp server lease day 20 hour 0 minute 0#interface GigabitEthernet0/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10#interface GigabitEthernet0/0/2 port hybrid pvid vlan 11 port hybrid untagged vlan 11 #return header Define the login banner hwtacacs Set the status of the HWTACACS(Huawei
13、 Terminal Access Controller Access Control System) service hwtacacs-server Set HWTACACS server icmp Specify ICMP configuration information icmp-reply Enable ICMP reply fast igmp-snooping Specify parameters for IGMP-Snooping info-center Specify information center configuration information interface S
14、pecify the interface configuration view ip IP information ipv6 Enable IPv6 functionality l2-topology Layer 2 topology l2protocol-tunnel Layer 2 protocol tunnel lacp Link aggregation control protocol lldp Link Layer Discovery Protocol load-balance Specify load balance mode loopback-detect Loopback de
15、tect function mac-address Mac-address mac-authen MAC authenticate configure information mac-forced-forwarding Mac-Forced Forwarding mac-learning MAC learning mac-limit MAC limit mac-spoofing-defend MAC spoofing defend mad Multi-active detection management-port Management port matched Is mand can be
16、matched by upper template mld-snooping Specify parameters for MLD-Snooping monitor-link Monitor link configuration information multicast Multicast configuration information nap NAP protocol nd Neighbor discovery nqa Network Quality Analysis(NQA) nqa-jitter Switch NQA jitter version nqa-server Specif
17、y NQA echo server ntp-service Specify NTP (Network Time Protocol) configuration information oam-mgr Oam-mgr view observe-port Configure observe port feature ping Ping function poe Power over Ethernet port Port port-group Port-group port-isolate Port isolate pppoe PPPOE qos QoS configuration radius-s
18、erver Add or delete RADIUS server template rmon Specify RMON configuration route-policy Route-policy route-policy-change Specify route policy change parameter router Configure router information rps Set RPS status rrpp Rapid ring protection protocol rsa Specify RSA module configuration information s
19、avi Source Address Validation Improvement scp Set SCP server screen-width Set screen width sep Smart ethernet protection set Set the mode of power management sflow SFlow module sftp Set SFTP service attribute slave Backup switch from master to slave sleep Set device to sleep mode smart-link Smart li
20、nk configuration information snmp-agent Specify SNMP(Simple Network Management Protocol) configuration information ssh Set the SSH (secure shell) configuration attribute ssl Security socket layer stack Stack stack-port Stack port startup Startup configuration stelnet Set Stelnet service attribute st
21、p Specify Spanning Tree Protocol (STP) configuration information suppression Suppression, include broadcast-suppression, multicast-suppression and unicast-suppression sys-netid System-netid sysname Specify the host name tcp Specify TCP(Transmission Control Protocol) configuration information telnet
22、Set the status of the Telnet service temperature Device temperature tftp Establish a TFTP connection tftp-server TFTP server time-range Specify time-range configuration information trace Trace route (switch) to host on Data Link Layer traffic Specify traffic configuration information traffic-filter
23、Filter packets based on acl traffic-limit Limit the rate of the packets based on acl traffic-mirror Mirror packets based on acl traffic-policy Apply specific traffic policy traffic-redirect Redirect packets based on acl traffic-remark Remark packets based on acl traffic-secure Filter packets based o
24、n acl traffic-statistic Count packets based on acl transceiver Transceiver user-bind User bind user-interface Configure the user terminal interface vlan Virtual LAN voice-vlan Voice VLANxinhaoundo vlxinhaoundo vlan 10xinhaoxinhaoxinhaoquxinhaoquitJan 14 2000 23:57:30 xinhao DS/4/DATASYNC_CFGCHANGE:O
25、ID 1.3.6.1.4.1.2021.5.25.191.3.1 configurations have been changed. The current change number is 23, the change loop count is 0, and the maximum number of records is 4095.dididisplay vlanThe total number of vlans is : 2-U: Up; D: Down; TG: Tagged; UT: Untagged;MP: Vlan-mapping; ST: Vlan-stacking;#: P
26、rotocolTransparent-vlan; *: Management-vlan;-VID Type Ports-1 mon UT: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)
27、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)757 mon UT:GE0/0/24(D)VID Status Property MAC-LRN Statistics Description-1 enable default enable disable VLAN 0001757 enable default enable disable VLAN 0757savesaveThe current configuration will be written to the device.Are you sure to continue?Y/NyNow saving the current configuration t
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1