H3C S3100 Series Configuration

Category
Software
Type
Configuration
DHCP
H3C Low-End Ethernet Switches Configuration Examples Table of Contents
i
Table of Contents
Chapter 1 DHCP Functions Overview .........................................................................................1-1
1.1 Supported DHCP Functions ..............................................................................................1-1
1.1.1 DHCP Functions Supported by the H3C Low-End Ethernet Switches...................1-1
1.2 Configuration Guide...........................................................................................................1-2
1.2.1 Configuring the DHCP Server.................................................................................1-2
1.2.2 Configuring the DHCP Relay Agent........................................................................1-8
1.2.3 Configuring DHCP Snooping ..................................................................................1-9
Chapter 2 Configuration Examples .............................................................................................2-1
2.1 DHCP Server Configuration Example................................................................................2-1
2.1.1 Network Requirements............................................................................................2-1
2.1.2 Network Diagram.....................................................................................................2-2
2.1.3 Configuration Procedure.........................................................................................2-2
2.2 DHCP Relay Agent/Snooping Configuration Examples ....................................................2-4
2.2.1 Network Requirements............................................................................................2-4
2.2.2 Network Diagram.....................................................................................................2-5
2.2.3 Configuration Procedure.........................................................................................2-6
2.3 Precautions......................................................................................................................2-11
2.3.1 Cooperation Between DHCP Relay Agent and IRF..............................................2-11
Chapter 3 Related Documents.....................................................................................................3-1
3.1 Protocols and Standards ...................................................................................................3-1
DHCP
H3C Low-End Ethernet Switches Configuration Examples Abstract
ii
DHCP Configuration Examples
Keywords: DHCP, Option 82
Abstract: This document describes DHCP configuration and application on Ethernet
switches in specific networking environments. Based on the different roles
played by the devices in the network, the functions and applications of DHCP
server, DHCP relay agent, DHCP snooping, and DHCP Option 82 are covered.
Acronym: DHCP (Dynamic Host Configuration Protocol).
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 1 DHCP Functions Overview
1-1
Chapter 1 DHCP Functions Overview
1.1 Supported DHCP Functions
1.1.1 DHCP Functions Supported by the H3C Low-End Ethernet Switches
Table 1-1 DHCP functions supported by the H3C low-end ethernet switches
Function
Model
DHCP server
DHCP relay
agent
DHCP snooping
S3600-EI
z
z
z
S3600-SI —
z
z
S5600
z
z
z
S3610
z
z
z
S5510
z
z
z
S5500-SI —
z
z
S5100 —
z
S3100 —
z
Depending on the models, the H3C low-end switches can support part or all of the
following DHCP functions:
DHCP server:
z DHCP server using global address pool/interface address pool
z IP address lease configuration
z Allocation of gateway addresses, DNS server addresses, WINS server addresses
to DHCP clients
z Static bindings for special addresses
z DHCP server security functions: detection of unauthorized DHCP servers and
detection of duplicate IP addresses
DHCP relay agent:
z DHCP relay agent
z DHCP relay agent security functions: address checking, DHCP server handshake,
and periodic update of client address entries
z DHCP Option 82
DHCP snooping:
z DHCP snooping
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 1 DHCP Functions Overview
1-2
z DHCP snooping security functions: DHCP snooping entry update and ARP source
checking
z DHCP Option 82
Note:
Refer to respective user manuals for detailed descriptions of the DHCP functions
supported by different models.
1.2 Configuration Guide
Note:
z The configuration varies with product models. The following configuration takes the
S3600 series as an example. Refer to respective operation manuals for the
configurations on other models.
z Only basic configuration steps are listed below. Refer to respective operation and
command manuals for the operating principles and applications of the functions.
1.2.1 Configuring the DHCP Server
The DHCP server can be configured to assign IP addresses from a global or interface
address pool. These two configuration methods are applicable to the following
environments:
z If the DHCP server and DHCP clients are on the same network segment, both
methods can be applied.
z If the DHCP server and DHCP clients are on different network segments, the
DHCP server can only be configured to assign IP addresses from a global address
pool.
1) Use the following commands to configure the DHCP server to assign IP addresses
from a global address pool.
Table 1-2 Configure IP address allocation from a global address pool
Operation Command Description
Enter system view
system-view
Enable the DHCP
service
dhcp enable
Optional
By default, the DHCP
service is enabled.
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 1 DHCP Functions Overview
1-3
Operation Command Description
Create a DHCP address
pool and enter DHCP
address pool view
dhcp server ip-pool pool-name
Required
By default, no global
DHCP address pool
is created.
Configure an IP address
range for dynamic
allocation
network ip-address
[ mask-length | mask mask ]
Required
By default, no IP
address range is
configured for
dynamic allocation.
Configure the lease
period of dynamically
allocated IP addresses
expired { day day [ hour hour
[ minute minute ] ] | unlimited }
Optional
IP address lease
period defaults to
one day.
Configure a domain
name for DHCP clients
domain-name domain-name
Required
By default, no
domain name is
configured for DHCP
clients.
Configure DNS server
addresses for DHCP
clients
dns-list ip-address&<1-8>
Required
By default, no DNS
server addresses are
configured.
Configure WINS server
addresses for DHCP
clients
nbns-list ip-address&<1-8>
Required
By default, no WINS
server addresses are
configured.
Specify a NetBIOS node
type for DHCP clients
netbios-type { b-node | h-node
| m-node | p-node }
Optional
By default, the DHCP
clients are h-nodes if
the command is not
specified.
Configure gateway
addresses for DHCP
clients
gateway-list ip-address&<1-8>
Required
By default, no
gateway address is
configured.
Configure a self-defined
DHCP option
option code { ascii ascii-string |
hex hex-string&<1-10> |
ip-address ip-address&<1-8> }
Required
By default, no
self-defined option is
configured.
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 1 DHCP Functions Overview
1-4
Operation Command Description
Return to
system view
quit
Create an
address pool for
the static
address binding
dhcp server ip-pool pool-name
Specify the IP
address of the
static binding
static-bind ip-address
ip-address [ mask-length | mask
mask ]
Specify
the MAC
address
of the
static
binding
static-bind mac-address
mac-address
Confi
gure
a
static
bindi
ng
Spe
cify
the
MA
C
addr
ess
or
the
clie
nt
ID
of
the
stati
c
bind
ing
Specify
the client
ID of the
static
binding
static-bind client-identifier
client-identifier
Optional
By default, no MAC
address or client ID
is bound to an IP
address statically.
Note:
z To configure a
static binding, you
need to specify
the IP address
and the MAC
address or client
ID.
z A static address
pool can be
configured with
only one IP
address-to-MAC
or IP
address-to-client
ID binding.
Return to system view
quit
Specify the IP
addresses to be
excluded from
automatic allocation
dhcp server forbidden-ip
low-ip-address
[ high-ip-address ]
Optional
By default, all the IP
addresses in a
DHCP address pool
are available for
dynamic allocation.
interface interface-type
interface-number
dhcp select global
On the
current
interface
quit
Configure
the global
address
pool mode
On
multiple
interfaces
in system
view
dhcp select global { interface
interface-type interface-number
[ to interface-type
interface-number ] | all }
Optional
By default, an
interface operates in
the global address
pool mode.
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 1 DHCP Functions Overview
1-5
Operation Command Description
Enable the detection of
unauthorized DHCP
servers
dhcp server detect
Required
By default, the
detection of
unauthorized DHCP
servers is disabled.
Set the
maximum
number of
ping
packets
sent by the
DHCP
server for
each IP
address
dhcp server ping packets
number
Optional
The default
maximum number is
2.
Configure
duplicate
IP
address
detection
Set a
response
timeout for
each ping
packet
dhcp server ping timeout
milliseconds
Optional
The default timeout
is 500 milliseconds.
Enable the DHCP
server to support Option
82
dhcp server relay information
enable
Optional
By default, the DHCP
server supports
Option 82.
2) Use the following commands to configure IP address allocation through the
interface address pool.
Table 1-3 Configure IP address allocation through the interface address pool
Operation Command Description
Enter system view
system-view
Enable the DHCP
service
dhcp enable
Optional
By default, the DHCP
service is enabled.
Configure multiple or all
the VLAN interfaces to
operate in interface
address pool mode
dhcp select interface
{ interface interface-type
interface-number [ to
interface-type
interface-number ] | all }
Optional
interface interface-type
interface-number
Configure a VLAN
interface to operate in
interface address pool
mode
dhcp select interface
Required
By default, a VLAN
interface operates in
global address pool
mode.
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 1 DHCP Functions Overview
1-6
Operation Command Description
Bind an IP address
statically to a client MAC
address or client ID
dhcp server static-bind
ip-address ip-address
{ client-identifier
client-identifier | mac-address
mac-address }
Optional
By default, no static
binding is configured
On the current
interface
dhcp server expired { day day
[ hour hour [ minute minute ] ] |
unlimited }
quit
Config
ure the
lease
period
of
dynami
cally
allocat
ed IP
addres
ses
On multiple
interfaces in
system view
dhcp server expired { day day
[ hour hour [ minute minute ] ] |
unlimited } { interface
interface-type interface-number
[ to interface-type
interface-number ] | all }
Optional
IP address lease
period defaults to
one day.
Return to system view
quit
Specify the IP addresses
to be excluded from
automatic allocation
dhcp server forbidden-ip
low-ip-address
[ high-ip-address ]
Optional
By default, all the IP
addresses in an
interface address
pool are available for
dynamic allocation.
interface interface-type
interface-number
dhcp server domain-name
domain-name
On one
interface
quit
Configure
a domain
name for
DHCP
clients
On multiple
interfaces
dhcp server domain-name
domain-name { interface
interface-type interface-number
[ to interface-type
interface-number ] | all }
Optional
By default, no
domain name is
configured for DHCP
clients.
interface interface-type
interface-number
dhcp server dns-list
ip-address&<1-8>
On one
interface
quit
Configure
DNS
server
addresses
for DHCP
clients
On multiple
interfaces
dhcp server dns-list
ip-address&<1-8> { interface
interface-type interface-number
[ to interface-type
interface-number ] | all }
Optional
By default, no DNS
server address is
configured.
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 1 DHCP Functions Overview
1-7
Operation Command Description
interface interface-type
interface-number
dhcp server nbns-list
ip-address&<1-8>
On one
interface
quit
Configure
WINS
server
addresses
for DHCP
clients
On multiple
interfaces
dhcp server nbns-list
ip-address&<1-8> { interface
interface-type interface-number
[ to interface-type
interface-number ] | all }
Optional
By default, no WINS
server addresses are
configured.
interface interface-type
interface-number
dhcp server netbios-type
{ b-node | h-node | m-node |
p-node }
On one
interface
quit
Define a
NetBIOS
node type
for DHCP
clients
On multiple
interfaces
dhcp server netbios-type
{ b-node | h-node | m-node |
p-node } { interface
interface-type interface-number
[ to interface-type
interface-number ] | all }
Optional
By default, no
NetBIOS node type
is specified and a
DHCP client uses the
h-node type.
interface interface-type
interface-number
dhcp server option code
{ ascii ascii-string | hex
hex-string&<1-10> | ip-address
ip-address&<1-8> }
On one
interface
quit
Configure
a
self-define
d DHCP
option
On multiple
interfaces
dhcp server option code
{ ascii ascii-string | hex
hex-string&<1-10> | ip-address
ip-address&<1-8> } { interface
interface-type interface-number
[ to interface-type
interface-number ] | all }
Optional
By default, no
self-defined option is
configured.
Enable the detection of
unauthorized DHCP
servers
dhcp server detect
Optional
By default, the
detection of
unauthorized DHCP
servers is disabled.
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 1 DHCP Functions Overview
1-8
Operation Command Description
Set the
maximum
number of
ping
packets
sent by the
DHCP
server for
each IP
address
dhcp server ping packets
number
Optional
The default
maximum number is
2.
Configure
duplicate
IP
address
detection
Set a
response
timeout for
each ping
packet
dhcp server ping timeout
milliseconds
Optional
The default timeout
is 500 milliseconds.
Enable the DHCP server
to support Option 82
dhcp server relay information
enable
Optional
By default, the DHCP
server supports
Option 82.
1.2.2 Configuring the DHCP Relay Agent
Use the following commands to configure the DHCP relay agent.
Table 1-4 Configure DHCP relay agent
Operation Command Description
Enter system view
system-view
Enable the DHCP service
dhcp enable
Optional
By default, the DHCP
service is enabled.
Configure DHCP server
IP addresses for a DHCP
server group
dhcp-server groupNo ip
ip-address&<1-8>
Required
By default, no DHCP
server IP address is
configured for a DHCP
server group.
Configure a DHCP user
address entry
dhcp-security static
ip-address mac-address
Optional
By default, no DHCP user
address entry is
configured.
Enable DHCP relay agent
handshake
dhcp relay hand enable
Optional
By default, DHCP relay
agent handshake is
enabled.
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 1 DHCP Functions Overview
1-9
Operation Command Description
Configure the interval at
which the DHCP relay
agent updates dynamic
client address entries
dhcp-security tracker
{ interval | auto }
Optional
By default, the update
interval is calculated
automatically according to
the number of the DHCP
client entries.
Enable the detection on
unauthorized DHCP
servers
dhcp-server detect
Required
By default, the detection
of unauthorized DHCP
servers is disabled.
Enable the DHCP relay
agent to support Option
82
dhcp relay information
enable
Required
By default, the DHCP
relay agent does not
support Option 82.
Configure a strategy for
the DHCP relay agent to
handle request packets
containing Option 82
dhcp relay information
strategy { drop | keep |
replace }
Optional
By default, the strategy is
replace.
Enter VLAN interface
view
interface interface-type
interface-number
Associate the interface to
a DHCP server group
dhcp-server groupNo
Required
By default, a VLAN
interface is not associated
to any DHCP server
group.
Enable the address
checking function for the
DHCP relay agent
address-check enable
Required
By default, the address
checking function is
disabled for the DHCP
relay agent.
1.2.3 Configuring DHCP Snooping
Use the following commands to configure DHCP snooping:
Table 1-5 Configure DHCP snooping
Operation Command Description
Enter system view
system-view
Enable DHCP snooping
dhcp-snooping
Required
By default, DHCP
snooping is disabled.
Enter Ethernet port view
interface interface-type
interface-number
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 1 DHCP Functions Overview
1-10
Operation Command Description
Specify the port
connected to the DHCP
server as a trusted port
dhcp-snooping trust
Optional
By default, all the ports of
a switch are untrusted
ports.
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 2 Configuration Examples
2-1
Chapter 2 Configuration Examples
2.1 DHCP Server Configuration Example
2.1.1 Network Requirements
An S3600 switch serves as the DHCP server in the corporate headquarters (HQ) to
allocate IP addresses to the workstations in the HQ and Branch, and it also acts as the
gateway to forward packets from the HQ. The network requirements are as follows:
z Assign the HQ the IP addresses in the 10.214.10.0/24 network segment, with a
lease period of two days, and exclude the IP addresses of the DNS server, WINS
server, and mail server from allocation.
z Assign IP addresses to the DNS server, WINS server, and the mail server in HQ
through static bindings.
z Assign the workstations in the Branch the IP addresses in the 10.210.10.0/24
network segment, with a lease period of three days, and assign the file server in
the Branch an IP address through a static IP-to-MAC binding.
z Assign the addresses of the gateway, DNS server, and the WINS server along
with an IP address to each workstation in the HQ and Branch.
z Enable the detection of unauthorized DHCP servers to prevent any unauthorized
DHCP server from allocating invalid addresses.
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 2 Configuration Examples
2-2
2.1.2 Network Diagram
DHCP Relay
Gateway
DHCP
Client
WINS
Server
DNS
Server
Mail
Server
10.214.10.5
002e-8d20-54c6
10.214.10.3
000d-85c7-4e20
10.214.10.4
0013-4ca8-9b71
DHCP
Client1
DHCP
Client2
File Server
10.210.10.4
000d-88f8-4e71
Branch
HQ
IP network
VLAN-int10
VLAN-int100
Figure 2-1 Network diagram for DHCP server configuration
2.1.3 Configuration Procedure
I. Software Version Used
The S3600 Ethernet switches running software version Release 1510 are used in this
example.
II. Configuring DHCP server
z Configure address allocation for the devices in the HQ.
# Configure the IP address of VLAN-interface10 on the DHCP server in the HQ.
<H3C> system-view
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] ip address 10.214.10.1 24
# Configure the interface to operate in the interface address pool mode, assigning the
IP addresses in the 10.214.10.0/24 network segment to the devices in the HQ.
[H3C-Vlan-interface10] dhcp select interface
# Configure the address lease period of the address pool, and configure the IP
addresses of the DNS server and WINS server.
[H3C-Vlan-interface10] dhcp server expired day 2
[H3C-Vlan-interface10] dhcp server dns-list 10.214.10.3
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 2 Configuration Examples
2-3
[H3C-Vlan-interface10] dhcp server nbst-list 10.214.10.4
No gateway needs to be configured for the clients because an interface operating in the
interface address pool mode automatically serves as the gateway for DHCP clients and
sends the requested information to the clients.
# Assign IP addresses to the DNS server, WINS server, and mail server through
IP-to-MAC bindings.
[H3C-Vlan-interface10] dhcp server static-bind ip-address 10.214.10.3
mac-address 000d-85c7-4e20
[H3C-Vlan-interface10] dhcp server static-bind ip-address 10.214.10.4
mac-address 0013-4ca8-9b71
[H3C-Vlan-interface10] dhcp server static-bind ip-address 10.214.10.5
mac-address 002e08d20-54c6
# Exclude the static IP addresses of the DNS server, WINS server, and mail server from
allocation.
[H3C-Vlan-interface10] quit
[H3C] dhcp server forbidden-ip 10.214.10.3 10.214.10.5
z Configure address allocation for the devices in the Branch.
# Create a global address pool named “br” for the Branch, and specify the range and
lease period of the IP addresses for allocation.
[H3C] dhcp server ip-pool br
[H3C-dhcp-pool-br] network 10.210.10.0 mask 255.255.255.0
[H3C-dhcp-pool-br] expired day 3
# Create a static binding address pool named “br-static”, and assign the file server in
the Branch an IP address through an IP-to-MAC binding.
[H3C-dhcp-pool-br] quit
[H3C] dhcp server ip-pool br-static
[H3C-dhcp-pool-br-static] static-bind ip-address 10.214.10.4 mask
255.255.255.0
[H3C-dhcp-pool-br-static] static-bind mac-address 000d-88f8-4e71
# Specify the gateway address, DNS server address, and the WINS server address for
the workstations in the Branch.
[H3C-dhcp-pool-br-static] quit
[H3C] dhcp server ip-pool br
[H3C-dhcp-pool-br] gateway-list 10.210.10.1
[H3C-dhcp-pool-br] dns-list 10.214.10.3
[H3C-dhcp-pool-br] nbst-list 10.214.10.4
# Exclude the static IP address of the gateway in the Branch from allocation.
[H3C-dhcp-pool-br] quit
[H3C] dhcp server forbidden-ip 10.210.10.1
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 2 Configuration Examples
2-4
# Enable the detection of unauthorized DHCP servers.
[H3C] dhcp server detect
# Configure VLAN-interface100 to operate in the global address pool mode.
[H3C] interface Vlan-interface 100
[H3C-Vlan-interface100] dhcp select global
Note that:
After DHCP configuration is complete, IP addresses can be assigned to the
workstations in the Branch only when a route is active between the HQ and the Branch.
III. Configuring the DHCP relay agent
This section mainly describes the DHCP server configuration. The following shows the
basic DHCP relay agent configuration that ensures the DHCP relay agent to relay
DHCP requests to the DHCP server. For details about DHCP relay agent configuration,
see section
2.2 "DHCP Relay Agent/Snooping Configuration Examples".
<H3C> system-view
[H3C] dhcp-server 1 ip 10.214.10.1
[H3C] interface Vlan-interface 5
[H3C-Vlan-interface5] dhcp-server 1
2.2 DHCP Relay Agent/Snooping Configuration Examples
2.2.1 Network Requirements
A Cisco Catalyst 3745 switch is deployed in the HQ and serves as the DHCP server to
assign IP addresses to the workstations in the Office branch. The branches are
connected to an IRF (intelligent resilient framework) Fabric that serves as the central
node and the DHCP relay agent to forward the DHCP requests from the workstations.
Meanwhile, a lab DHCP server is used to assign IP addresses to the devices in the labs.
The network requirements are as follows:
z Configure the DHCP server in the HQ to assign the IP addresses in the
192.168.10.0/24 network segment to the workstations in the Office branch, with a
lease period of 12 hours. Configure the IP addresses of the DNS server and WINS
server as 192.169.100.2 and 192.168.100.3 respectively.
z The IRF Fabric is connected to the branches and is comprised of four switches. It
serves as the DHCP relay agent to forward the DHCP requests from the
workstations in the Office and the devices in the labs. It is enabled to detect
unauthorized DHCP servers.
z An Ethernet switch in Lab1 serves as the Lab DHCP server to assign the IP
addresses in the 192.168.17.0/24 network segment to the devices in Lab1, with a
lease period of one day, and to assign the IP addresses in the 192.168.19.0/24
network segment to Lab2, with a lease period of two days. The lab DHCP server
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 2 Configuration Examples
2-5
and the IRF Fabric are interconnected through the 172.16.2.4/30 network
segment.
z Configure the address checking function on the DHCP relay agent so that only the
devices that are assigned legal IP addresses from the DHCP server are allowed to
access the external network.
z Configure address entry update on the DHCP relay agent so that it updates the
address entries by sending requests to the DHCP server every one minute.
z Enable DHCP snooping to support DHCP Option 82, adding local port information
to the Option 82 field in DHCP messages.
z Enable the DHCP relay agent to support DHCP Option 82 so that the DHCP relay
agent keeps the original filed unchanged upon receiving DHCP messages
carrying Option 82.
z Enable the DHCP server to support DHCP Option 82 so that it assigns the IP
addresses 192.168.10.2 through 192.168.10.25 to the DHCP clients connected to
Ethernet1/0/11 on the DHCP snooping switch and assigns 192.168.10.100
through 192.168.10.150 to the DHCP clients connected to Ethernet1/0/12 of the
DHCP snooping switch.
2.2.2 Network Diagram
IP network
SwitchA
(Master)
SwitchB
(Unit2)
SwitchC
(Unit3)
SwitchD
(Unit4)
VLAN-int 10
192.168.10.1
Eth1/0/1
Eth1/0/11
Eth1/0/12
Eth1/0/13
VLAN-int 17
172.16.2.4/30
VLAN-int 15
192.168.17.1
0010-5ce9-1dea
IRF Fabric
DHCP Relay
VLAN-int 25
192.168.19.1
Lab2
HQ
Office Lab1
Lab DHCP Server
DHCP Snooping
Cisco Catalyst
3745
192.168.0.3
Figure 2-2 Network diagram for DHCP relay agent/snooping integrated configuration
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 2 Configuration Examples
2-6
2.2.3 Configuration Procedure
In this example, the IRF Fabric is comprised of S3600 switches running software
version Release 1510, a Quidway S3552 switch running software version Release
0028 is used as the DHCP snooping-capable switch, and a Quidway S3528 switch
running software version Release 0028 is used as the Lab DHCP server.
For better readability:
z The devices in the IRF Fabric are SwitchA, SwitchB, SwitchC, and SwitchD.
z The DHCP snooping-capable device is referred to as “Snooping”.
z The device serving as the Lab DHCP server is referred to as “LAB”.
I. Configuring IRF Fabric
The S3600 series support IRF Fabric. You can interconnect four devices to form a
Fabric for centralized management of the devices in the Fabric. For details, see related
sections in the operation manuals for the S3600 series.
II. Configuring the DHCP relay agent
Figure 2-3 Network diagram for DHCP relay agent configuration
Within the IRF Fabric, configuration made on a device can be synchronized to the other
devices. Therefore, configuration is performed on Switch A only in this example.
# Configure to forward the DHCP requests from the Office to the DHCP server in the
HQ.
<SwitchA> system-view
[SwitchA] dhcp-server 1 ip 192.168.0.3
[SwitchA] interface vlan-interface10
[SwitchA-Vlan-interface10] ip address 192.168.10.1 24
[SwitchA-Vlan-interface10] dhcp-server 1
# Configure to forward the DHCP requests from Lab2 to the Lab DHCP server.
[SwitchA-Vlan-interface10] quit
[SwitchA] dhcp-server 2 ip 192.168.17.1
[SwitchA] interface Vlan-interface 25
[SwitchA-Vlan-interface25] ip address 192.168.19.1 24
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 2 Configuration Examples
2-7
[SwitchA-Vlan-interface25] dhcp-server 2
# Configure the IP address of VLAN-interface17 as 172.16.2.5/30 for forwarding DHCP
packets from the Lab DHCP Server to a non-local segment.
[SwitchA-Vlan-interface25] quit
[SwitchA] interface Vlan-interface 17
[SwitchA-Vlan-interface17] ip add 172.16.2.5 30
# Configure the address checking function on the DHCP relay agent. Make sure you
configure the IP addresses and MAC addresses of the two DHCP servers as static
entries for the security function.
[SwitchA-Vlan-interface17] quit
[SwitchA] dhcp-security static 192.168.0.3 000D-88F8-4E71
[SwitchA] dhcp-security static 192.168.17.1 0010-5ce9-1dea
[SwitchA] interface Vlan-interface 10
[SwitchA-Vlan-interface10] address-check enable
[SwitchA-Vlan-interface10] quit
[SwitchA] interface vlan-interface 25
[SwitchA-Vlan-interface25] address-check enable
[SwitchA-Vlan-interface25] quit
# Configure the address entry update interval on the DHCP relay agent.
[SwitchA] dhcp relay hand enable
[SwitchA] dhcp-security tracker 60
# Enable the DHCP relay agent to support DHCP Option 82 and adopt the strategy of
keeping the original filed upon receiving DHCP messages carrying Option 82.
[SwitchA] dhcp relay information enable
[SwitchA] dhcp relay information strategy keep
# Enable the DHCP relay agent to detect unauthorized DHCP servers.
[SwitchA] dhcp-server detect
# Enable UDP-Helper so that the IRF Fabric can operate in the DHCP relay agent
mode.
[SwitchA] udp-helper enable
# To ensure normal forwarding of DHCP packets across network segments, you need
configure a routing protocol and advertise the network segments of interfaces. The
following configuration uses RIP as an example. For the configuration of other routing
protocols, see the parts covering routing protocols in product manuals.
[SwitchA] rip
[SwitchA-rip] network 192.168.10.0
[SwitchA-rip] network 192.168.19.0
[SwitchA-rip] network 172.16.0.0
DHCP
H3C Low-End Ethernet Switches Configuration Examples Chapter 2 Configuration Examples
2-8
Note:
For the DHCP relay agent using the IRF structure and the DHCP server in the HQ to
communicate with each other, an active route must also be configured between them.
This configuration is performed by the ISP or the user; therefore, it will not be covered
in this document.
III. Configuring the Lab DHCP server
VLAN-int 15
192.168.17.1
0010-5ce9-1dea
Lab1
VLAN-int 17
172.16.2.4/30
Figure 2-4 Network diagram for the Lab DHCP server configuration
# Configure an address pool for Lab2 and specify the address range, lease period, and
the gateway address.
<LAB> system-view
[LAB] dhcp enable
[LAB] dhcp server ip-pool lab2
[LAB-dhcp-lab2] network 192.168.19.0 255.255.255.0
[LAB-dhcp-lab2] expired day 2
[LAB-dhcp-lab2] gateway-list 192.168.19.1
# Configure the IP address of VLAN-interface17 as 172.16.2.6/30 and enable it to
operate in global address pool mode.
[LAB-dhcp-lab2] quit
[LAB] interface Vlan-interface 17
[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
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115
  • Page 116 116
  • Page 117 117
  • Page 118 118
  • Page 119 119
  • Page 120 120
  • Page 121 121
  • Page 122 122
  • Page 123 123
  • Page 124 124
  • Page 125 125
  • Page 126 126
  • Page 127 127
  • Page 128 128
  • Page 129 129
  • Page 130 130
  • Page 131 131
  • Page 132 132
  • Page 133 133
  • Page 134 134
  • Page 135 135
  • Page 136 136
  • Page 137 137
  • Page 138 138
  • Page 139 139
  • Page 140 140
  • Page 141 141
  • Page 142 142
  • Page 143 143
  • Page 144 144
  • Page 145 145
  • Page 146 146
  • Page 147 147
  • Page 148 148
  • Page 149 149
  • Page 150 150
  • Page 151 151
  • Page 152 152
  • Page 153 153
  • Page 154 154
  • Page 155 155
  • Page 156 156
  • Page 157 157
  • Page 158 158
  • Page 159 159
  • Page 160 160
  • Page 161 161
  • Page 162 162
  • Page 163 163
  • Page 164 164
  • Page 165 165
  • Page 166 166
  • Page 167 167
  • Page 168 168
  • Page 169 169
  • Page 170 170
  • Page 171 171
  • Page 172 172
  • Page 173 173
  • Page 174 174
  • Page 175 175
  • Page 176 176
  • Page 177 177
  • Page 178 178
  • Page 179 179
  • Page 180 180
  • Page 181 181
  • Page 182 182
  • Page 183 183
  • Page 184 184
  • Page 185 185
  • Page 186 186
  • Page 187 187
  • Page 188 188
  • Page 189 189
  • Page 190 190
  • Page 191 191
  • Page 192 192
  • Page 193 193
  • Page 194 194
  • Page 195 195
  • Page 196 196
  • Page 197 197
  • Page 198 198
  • Page 199 199
  • Page 200 200
  • Page 201 201
  • Page 202 202
  • Page 203 203
  • Page 204 204
  • Page 205 205
  • Page 206 206
  • Page 207 207
  • Page 208 208
  • Page 209 209
  • Page 210 210
  • Page 211 211
  • Page 212 212
  • Page 213 213
  • Page 214 214
  • Page 215 215
  • Page 216 216
  • Page 217 217
  • Page 218 218
  • Page 219 219
  • Page 220 220
  • Page 221 221
  • Page 222 222
  • Page 223 223
  • Page 224 224
  • Page 225 225
  • Page 226 226
  • Page 227 227
  • Page 228 228
  • Page 229 229
  • Page 230 230
  • Page 231 231
  • Page 232 232
  • Page 233 233
  • Page 234 234
  • Page 235 235
  • Page 236 236
  • Page 237 237
  • Page 238 238
  • Page 239 239
  • Page 240 240
  • Page 241 241
  • Page 242 242
  • Page 243 243
  • Page 244 244
  • Page 245 245
  • Page 246 246
  • Page 247 247
  • Page 248 248
  • Page 249 249
  • Page 250 250
  • Page 251 251
  • Page 252 252
  • Page 253 253
  • Page 254 254
  • Page 255 255
  • Page 256 256
  • Page 257 257
  • Page 258 258
  • Page 259 259
  • Page 260 260
  • Page 261 261
  • Page 262 262
  • Page 263 263
  • Page 264 264
  • Page 265 265
  • Page 266 266
  • Page 267 267
  • Page 268 268
  • Page 269 269
  • Page 270 270
  • Page 271 271
  • Page 272 272
  • Page 273 273
  • Page 274 274
  • Page 275 275
  • Page 276 276
  • Page 277 277
  • Page 278 278
  • Page 279 279
  • Page 280 280
  • Page 281 281
  • Page 282 282
  • Page 283 283
  • Page 284 284
  • Page 285 285
  • Page 286 286
  • Page 287 287
  • Page 288 288
  • Page 289 289
  • Page 290 290
  • Page 291 291
  • Page 292 292
  • Page 293 293
  • Page 294 294
  • Page 295 295
  • Page 296 296
  • Page 297 297
  • Page 298 298
  • Page 299 299
  • Page 300 300
  • Page 301 301
  • Page 302 302
  • Page 303 303
  • Page 304 304
  • Page 305 305
  • Page 306 306
  • Page 307 307
  • Page 308 308
  • Page 309 309
  • Page 310 310
  • Page 311 311
  • Page 312 312
  • Page 313 313

H3C S3100 Series Configuration

Category
Software
Type
Configuration

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI