Dhcp settings for Huawei Switches

Source: Internet
Author: User

In network settings, we usually use the DHCP protocol to manage IP addresses. Some switch devices will also have this function. Let's talk about the dhcp configuration process of Huawei switches. Conducts in-depth settings and test and verification on dhcp of Huawei switches. many practical problems may occur when you contact the dhcp service of Huawei switches, it has always been a hot topic, so today we are mainly trying to solve the problem of testing and verification.

Huawei switch dhcp8016vlan user]

The user's vlan id is 20. Create and enter the VLAN configuration view.

[Quidway] vlan 20

Set the VLAN 20 user Address Allocation Method to local.

[Quidway-vlan20] address allocate local

Configure the IP address 10.10.2.1 of the VLAN 20 interface, and specify the address resource that can be allocated by the dhcp server of the Huawei switch as 10.10.2.0 ~ 10.10.2.255.

[Quidway] interface vlan 20

[Quidway-Vlanif20] ip address 10.10.2.1 255.255.255.0

A DNS server is down in S8016 with the IP address 10.10.2.15. In S8016, the IP address of the DNS server is set and cannot be allocated to the user in the address pool.

[Quidway-vlan2] dhcp server forbidden-ip 10.10.2.15

[Quidway-vlan2] dns primary-ip 10.10.2.15

Enter G1/0/2, set to trunk port, and allow vlan20 to pass through

[Quidway-gigabitethernet 1/0/2] port trunk permit vlan 20

Huawei switch dhcp global address user]

Create a global address pool and name it "abc". The address pool user gateway address is 10.10.30.1.

[Quidway] dhcp server ip-pool abc 10.10.3.1 255.255.255.0

Configure route IP information

[Quidway] dhcp server gateway abc 10.10.3.1

In S8016, another DNS server is mounted. The IP address is 10.10.3.15. In S8016, the IP address of the DNS server is set and cannot be allocated to the user in the address pool.

[Quidway] dns primary-ip abc 10.10.3.15

[Quidway] dhcp server forbidden-ip abc 10.10.3.15

Configure VLAN200 and the Virtual Interface vlan200 corresponding to SwitchB in the same network segment

[Quidway] interface vlanif 200

[Quidway-Vlanif200] ip address 10.10.10.1 255.255.255.0

Configurations of Huawei switch dhcpSwitchB]

Create and enter) vlan30

[SwitchB] vlan 30

Add E0/1 to vlan30

A [SwitchB-vlan30] port Ethernet 0/1

In practice, the uplink port is generally set to the trunk attribute, allowing vlan passthrough

[SwitchB-GigabitEthernet2/1] port link-type trunk

Allow the SwitchC vlan to pass through the G2/1 Port

[SwitchB-GigabitEthernet2/1] port trunk permit vlan 30

In practice, the uplink port is generally set to the trunk attribute, allowing vlan passthrough

[SwitchB-GigabitEthernet1/1] port link-type trunk

Allow all VLANs to pass through E0/3, or specify the specific vlan Value

[SwitchB-GigabitEthernet1/1] port trunk permit vlan 30

Create virtual interfaces for) vlan30

[SwitchB] interface Vlan-interface 30

Configure IP addresses for vlan30 virtual Interfaces

[SwitchB-Vlan-interface30] ip address 10.10.3.1 255.255.255.0

[SwitchB]

Define a Huawei switch dhcp server

[SwitchB] dhcp-server 0 ip 10.10.10.1

[SwitchB-Vlan-interface30] dhcp-server 0

Vlan200 is used to connect SwitchB to vlan200.

[SwitchB] interface Vlan-interface 200

Configure IP addresses for vlan200 virtual Interfaces

[SwitchB-Vlan-interface200] ip address 10.10.10.2 255.255.255.0

Configuration of Huawei switch dhcpSwitchC]

Create and enter) vlan30

[SwitchC] vlan 30

Add E0/1 to vlan30

A [SwitchC-vlan30] port Ethernet 0/1

In practice, the uplink port is generally set to the trunk attribute, allowing vlan passthrough

[SwitchC-GigabitEthernet1/1] port link-type trunk

Allow all VLANs to pass through E0/3, or specify the specific vlan Value

[SwitchC-GigabitEthernet1/1] port trunk permit vlan 30

Huawei switch dhcp test and verification]

Both PC1, PC2, and PC3 can obtain the IP address and gateway correctly.

Both PC1, PC2, and PC3 can PING their own gateways and dhcp servers of Huawei switches.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.