HCL simulator configured DHCP

Experiment 1:
Experiment topology HCL simulator configured DHCP
configuration steps (on the router)
(1) # Configure interface IP address.
<H3C>-View System
[H3C] interface G 0/0
[[the GigabitEthernet0-H3C / 0]] IP address 192.168.1.254 24
[[the GigabitEthernet0-H3C / 0]] quit
(2) # enable DHCP services.
[H3C] DHCP enable
(. 4) DHCP address pool # 0, dynamic binding, assign IP addresses.
The segment can be allocated to 192.168.1.0/24, lease expiration period of 10 days, DNS server address is 192.168.1.10.
[H3C] the pool DHCP Server IP-0
[DHCP-the pool-H3C-0] Network 192.168.1.0 mask 255.255.255.0
[DHCP-the pool-H3C-0] expired The Day 10
[DHCP-the pool-H3C-0] DNS-List 192.168.1.10
[H3C-dhcp-the pool-0] Gateway-List 192.168.1.254
[H3C-dhcp-the pool-0] quit
experiment 2:
experiment topology
HCL simulator configured DHCP
this task is mainly to do DHCP relay.
DHCP server on the router, while the SWA VLAN 3, belong to three different network segments,
DHCP request packet is broadcast, the relay must be set to be able to spread on the SWA router.

Configuration Step
(1) # router.
<H3C>-View System
[H3C] interface G 0/0
[[the GigabitEthernet0-H3C / 0]] IP 30 address 10.1.1.2
[[the GigabitEthernet0-H3C / 0]] quit

Enable DHCP service.

[H3C] dhcp enable

DHCP address pool 1, the address allocated to the client from the network segment 192.168.1.0/24.

[H3C] dhcp server ip-pool 1
[H3C-dhcp-pool-0] network 192.168.10.0 mask 255.255.255.0
[H3C-dhcp-pool-0] dns-list 8.8.8.8
[H3C-dhcp-pool-0] gateway-list 192.168.10.254
[H3C-dhcp-pool-0] quit

DHCP address pool 2, assign an address to the client from the network segment 192.168.20.0/24.

[H3C] dhcp server ip-pool 2
[H3C-dhcp-pool-0] network 192.168.20.0 mask 255.255.255.0
[H3C-dhcp-pool-0] dns-list 8.8.8.8
[H3C-dhcp-pool-0] gateway-list 192.168.20.254
[H3C-dhcp-pool-0] quit

配置 DHCP 地址池 3,为来自 192.168.30.0/24网段内的客户端分配地址。

[H3C] dhcp server ip-pool 3
[H3C-dhcp-pool-0] network 192.168.30.0 mask 255.255.255.0
[H3C-dhcp-pool-0] dns-list 8.8.8.8
[H3C-dhcp-pool-0] gateway-list 192.168.30.254
[H3C-dhcp-pool-0] quit

配置静态路由到192.168.0.0/16网段

[H3C]ip route-static 192.168.0.0 16 10.1.1.1
(2)# 配置 SWA交换机。

建立vlan,并且配置各接口的 IP 地址。

<H3C> system-view
[H3C]vlan 10
[H3C-vlan10]quit
[H3C]vlan 20
[H3C-vlan20]quit
[H3C]vlan 30
[H3C-vlan30]quit

[H3C]inter range g 1/0/1 to g 1/0/5
[H3C-if-range]port link-type access
[H3C-if-range]port access vlan 10
[H3C-if-range]quit
[H3C]inter range g 1/0/6 to g 1/0/10
[H3C-if-range]port link-type access
[H3C-if-range]port access vlan 20
[H3C-if-range]quit
[H3C]inter range g 1/0/11 to g 1/0/15
[H3C-if-range]port link-type access
[H3C-if-range]port access vlan 30
[H3C-if-range]quit

[H3C]inter vlan 10
[H3C-Vlan-interface10]ip add 192.168.10.254 24
[H3C-Vlan-interface10]quit
[H3C]inter vlan 20
[H3C-Vlan-interface20]ip add 192.168.20.254 24
[H3C-Vlan-interface20]quit
[H3C]inter vlan 30
[H3C-Vlan-interface30]ip add 192.168.30.254 24
[H3C-Vlan-interface30]quit
[H3C]
[H3C]inter g 1/0/23
[H3C-GigabitEthernet1/0/23]port link-m r
[H3C-GigabitEthernet1/0/23]ip add 10.1.1.1 30
[H3C-GigabitEthernet1/0/23]quit
(3)#配置DHCP中继(SWA交换机)

启用 DHCP 服务。

[H3C] dhcp enable

配置 VLAN 接口 10 工作在 DHCP 中继模式。

[H3C] interface vlan-interface 10
[H3C-Vlan-interface10] dhcp select relay

配置 DHCP 服务器的地址。

[H3C-Vlan-interface10] dhcp relay server-address 10.1.1.2
[H3C-Vlan-interface10] quit

Configuring VLAN 20 interface to working mode of the DHCP relay.

[H3C] interface vlan-interface 20
[H3C-Vlan-interface20] dhcp select relay
[H3C-Vlan-interface20] dhcp relay server-address 10.1.1.2
[H3C-Vlan-interface20] quit

Configuring a VLAN interface 30 the DHCP relay.

[H3C] interface vlan-interface 30
[H3C-Vlan-interface30] dhcp select relay
[H3C-Vlan-interface30] dhcp relay server-address 10.1.1.2
[H3C-Vlan-interface30] quit

Guess you like

Origin blog.51cto.com/14217008/2412625