Anda di halaman 1dari 3

Configuration Example for DHCP Relay Agent Information Option 82

1. Definition of DHCP Relay Option 82

The Switch can be setup as a DHCP relay agent. A DHCP relay agent extends the reach of a DHCP
server so that it is not necessary to use multiple DHCP servers to accommodate multiple IP subnets. As a
relay agent, the Switch does not manage IP addresses. It relays DHCP requests on behalf of clients
located on a local subnet to a remote or centralized DHCP server.

An additional feature has been created to further aid in local management of the IP addresses. Option 82
is used by the relay agent to insert additional information into the client’s DHCP request. This
information can be used to implement policies intended to improve security and efficiency.
For simplicity, references to DHCP include BOOTP, i.e. DHCP requests are treated identically to
BOOTP requests for the DHCP relay agent.

2. DHCP option 82 field format of the specific DHCP relay agent

The DHCP option 82 field format of DES-3526/DES-3550 is defined as follows :

-- Circuit ID suboption format :


1. 2. 3. 4. 5. 6. 7.
1 6 0 4 VLAN Module Port
1 byte 1 byte 1 byte 1 byte 2 bytes 1 byte 1 byte

1. Suboption type 2. Length 3. Circuit ID type 4. Length


5. VLAN : the incoming VLAN ID of DHCP client packet.
6 . Module : For a standalone switch, Module is always 0; For a stackable switch, module is Unit ID.
7. Port : the incoming port number of DHCP client packet, port number starts from 1

-- Remote ID suboption format :


1. 2. 3. 4. 5
2 8 0 6 MAC address
1 byte 1 byte 1 byte 1 byte 6 bytes

1. Suboption type 2. Length 3. Remote ID type 4. Length


5. MAC address : the switch’s system MAC address.
3. Configuration Example

Devices :
1) DHCP Server 10.51.8.1 on subnet 10.0.0.0/8
2) Router or L3 switch acting as gateway for 2 subnets
10.51.8.11 on subnet 10.0.0.0/8
30.51.8.11 on subnet 30.0.0.0/8
3) L2 switch (DES-3526/DES-3550) acting as DHCP Relay Agent 30.51.8.12 on 30.0.0.0/8
Its system MAC address is 00-80-C8-35-26-0A
4) 2 laptops acting as DHCP clients, connecting to L2 switch’s port 9, port 10 respectively

Diagram :

R o u te r
I P : 1 0 .5 1 .8 .1 1
S u b n e t : 1 0 .0 .0 .0 / 8

I P : 3 0 .5 1 .8 .1 1
S u b n e t : 3 0 .0 .0 .0 / 8

L 2 S w i tc h
I P : 3 0 .5 1 .8 .1 2
S y s te m M A C
0 0 -8 0 -C 8 -3 5 -2 6 -0 A

D H C P C lie nt A D H C P C lie nt B

Scenario :
1) DHCP server will use a dynamic pool 30.51.8.100 – 30.51.8.200 to assigned to any DHCP
client which is relayed by DHCP Relay agent 30.51.8.12.
---Normal DHCP function
2) While any DHCP client connects to port 9 of the L2 switch, DHCP server will assign IP
address 30.51.8.161 to it ; while any DHCP client connects to port 10 of the L2 switch, DHCP
server will assign IP address 30.51.8.162 to it.
---DHCP option 82 function
CLI command Settings on L2 switch(DES-3526/DES-3550) :
1) # create iproute default 30.51.8.11
2) # config dhcp_relay add ipif System 10.51.8.1
3) # config dhcp_relay option_82 state enable
4) # enable dhcp_relay

DHCP Server settings :


Because there are a variety of DHCP servers, we take haneWIN DHCP server 2.1 as an example.
(you can get a 30day-evaluation version on http://www.hanewin.de/homee.htm)
1) configure “Basic Profile”
Relay IP : 30.51.8.12
Dynamic IP Addresses : From 30.51.8.100 until 30.51.8.200
Subnet mask : 255.0.0.0
Gateway Address : 30.51.8.11
2) Configure DHCP option 82
a) assign IP address 30.51.8.161 to DHCP client A connecting to port 9 of the L2 switch
“Add static entries”
check “Circuit Identifier” and “Remote Identifier”
Hardware Address : 00040001000900060080c835260a
IP Address : 30.51.8.161
b) assign IP address 30.51.8.162 to DHCP client B connecting to port 10 of the L2 switch
“Add static entries”
check “Circuit Identifier” and “Remote Identifier”
Hardware Address : 00040001000a00060080c835260a
IP Address : 30.51.8.162

Advanced Application:
If port 26 of DES-3526 switch is the uplink port to the gateway, user may want the following scenario:
DHCP client A can not communicate with DHCP client B, but either one can communicate with any IP
devices outsides DES-3526. In this case, traffic segmentation can achieve this goal:
# config traffic_segmentation 9 forward_list 26
# config traffic_segmentation 10 forward_list 26

Anda mungkin juga menyukai