Configuring the Cisco IOS XE DHCP Relay Agent

Cisco routers running Cisco IOS XE software include Dynamic Host Configuration Protocol (DHCP) server and relay agent software. A DHCP relay agent is any host that forwards DHCP packets between clients and servers. This module describes the concepts and tasks needed to configure the Cisco IOS XE DHCP relay agent.

Specifying the Packet Forwarding Address

Perform this task to configure the DHCP relay agent to forward packets to a DHCP server.

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. interface type number
  4. ip helper-address address

DETAILED STEPS

Command or Action Purpose
Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

interface type number

Example:

Device(config)# interface GigabitEthernet0/0/0

Configures an interface and enters interface configuration mode.

Step 4

ip helper-address address

Example:

Device(config-if)# ip helper-address 172.16.1.2

Forwards UPD broadcasts, including BOOTP and DHCP.

  • The address argument can be a specific DHCP server address, or it can be the network address if other DHCP servers are on the destination network segment. Using the network address enables other servers to respond to DHCP requests.

  • If you have multiple servers, you can configure one helper address for each server.

Note 

If Intelligent Wireless Access Gateway (IWAG) router is relaying DHCP packets to external DHCP server, it requires to configure DHCP relay pool instead of ip helper address under subscriber interface to be stateful.

ip dhcp pool DHCP_Relay_pool_name

ip dhcp pool relay_pool1
relay source 10.56.151.76
relay destination 10.48.155.76

Configuring Relay Agent Information Option Support

Perform this task to enable support for the DHCP relay agent information option.

Note

  • If an ip dhcp relay information command is configured in global configuration mode but not configured in interface configuration mode, the global configuration is applied to all interfaces.
  • If an ip dhcp relay information command is configured in both global configuration mode and interface configuration mode, the interface configuration command takes precedence over the global configuration command. However, the global configuration is applied to interfaces without the interface configuration.
  • If an ip dhcp relay information command is not configured in global configuration mode but is configured in interface configuration mode, only the interface with the configuration option applied is affected. All other interfaces are not impacted by the configuration.
See the "Configuring Relay Agent Information Option Support per Interface" section for more information on per-interface support for the relay agent information option. >

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. ip dhcp relay information option
  4. ip dhcp relay information check
  5. ip dhcp relay information policy {drop | keep | replace }
  6. ip dhcp relay information trust-all
  7. end
  8. show ip dhcp relay information trusted-sources

DETAILED STEPS

Command or Action Purpose
Step 1

enable

Example:

Router> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3

ip dhcp relay information option

Example:

Router(config)# ip dhcp relay information option

Enables the system to insert the DHCP relay agent information option (option-82 field) in forwarded BOOTREQUEST messages to a DHCP server.

  • This function is disabled by default.

Step 4

ip dhcp relay information check

Example:

Router(config)# ip dhcp relay information check

(Optional) Configures DHCP to check that the relay agent information option in forwarded BOOTREPLY messages is valid.

  • By default, DHCP checks that the option-82 field in DHCP reply packets it receives from the DHCP server is valid. If an invalid message is received, the relay agent drops it. If a valid message is received, the relay agent removes the option-82 field and forwards the packet. Use the ip dhcp relay information check command to reenable this functionality if it has been disabled.

Step 5

ip dhcp relay information policy {drop | keep | replace }

Example:

Router(config)# ip dhcp relay information policy replace

(Optional) Configures the reforwarding policy for a DHCP relay agent (what a relay agent should do if a message already contains relay information).

  • See the "Relay Agent Information Reforwarding Policy" section for more information.

Step 6

ip dhcp relay information trust-all

Example:

Router(config)# ip dhcp relay information trust-all

(Optional) Configures all interfaces on a router as trusted sources of the DHCP relay information option.

  • By default, if the gateway address is set to all zeros in the DHCP packet and the relay agent information option is already present in the packet, the DHCP relay agent will discard the packet. Use the ip dhcp relay information trust-all command to override this behavior and accept the packets.

  • This command is useful if there is a switch in between the client and the relay agent that may insert option 82. Use this command to ensure that these packets do not get dropped.

  • You can configure an individual interface as a trusted source of the DHCP relay information option by using the ip dhcp relay information trusted interface configuration mode command.

Step 7

end

Example:

Router(config)# end

Returns to privileged EXEC mode.

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值