H3C S7500 Series Ethernet Switches Release 3135 DHCP Configuration Examples
DHCP Configuration Examples
H3C S7500 Series Ethernet Switches Release 3135 Chapter 2 Configuration Examples
2-8
[LAB-Vlan-interface17] ip address 172.16.2.6 30
[LAB-Vlan-interface17] dhcp select global
# Lab1 is connected to VLAN-interface15. Therefore, to assign the IP addresses in the
192.168.17.0/24 network segment to the devices in Lab1, you only need to configure
VLAN-interface15 to operate in the interface address pool mode.
[LAB-Vlan-interface17] quit
[LAB] interface vlan-interface 15
[LAB-Vlan-interface15] ip address 192.168.17.1 24
[LAB-Vlan-interface15] dhcp select interface
[LAB-Vlan-interface15] dhcp server expired day 1
[LAB-Vlan-interface15] quit
# To ensure that the lab DHCP server forwards DHCP packets normally, you need
configure a routing protocol. The following configuration uses RIP as an example. For
the configuration of other routing protocols, see the related parts in product manuals.
[LAB] rip
[LAB-rip] network 192.168.17.0
[LAB-rip] network 172.16.0.0
III. Configuring DHCP snooping
Figure 2-5 Network diagram for DHCP snooping configuration
# Enable DHCP snooping and enable Option 82 support for DHCP snooping.
<Snooping> system-view
[Snooping] dhcp-snooping
[Snooping] dhcp-snooping information enable
# Configure Ethernet 2/0/1 that connects to the DHCP server as a DHCP trusted port.
[Snooping] interface Ethernet 2/0/1
[Snooping-Ethernet2/0/1] dhcp-snooping trust