What does the command ip helper-address server-ip do?

Using IP Helper Addresses for DHCP

Problem

You want to configure your router to pass DHCP requests from local clients to a centralized DHCP server.

Solution

The ip helper-address configuration command allows the router to forward local DHCP requests to one or more centralized DHCP servers:

Router1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router1(config)#interface Ethernet0 Router1(config-if)#ip helper-address 172.25.1.1 Router1(config-if)#ip helper-address 172.25.10.7 Router1(config-if)#exit Router1(config)#end Router1#

Discussion

The traditional role of routers in DHCP has been simply to act as a proxy device, forwarding information between the client and server. Since IOS level 12.0(1)T, Cisco routers also have DHCP server and client features. But the DHCP proxy function is still the most common for routers.

Because the initial DHCP request comes from a client that typically doesn’t have an IP address, it must find the server using a Layer 2 broadcast. So, if the router was not able to function as a proxy for these broadcasts, it would be necessary to put a DHCP server on every network segment.

The DHCP server needs two critical pieces of information before it can allocate an IP address to the client. It must know the subnet that the client is connected to, and it needs the client device’s MAC address. The subnet information is needed to ensure that the address that the server allocates will actually work on client’s network segment. And the MAC ...

To forward a client broadcast request for a UDP application when the client and server are on different networks, you must configure a helper address on the interface connected to the client.

Specify the server IP address or the subnet directed broadcast address of the server's IP subnet as the helper address. You can configure up to 16 helper addresses on each interface. You can configure a helper address on an Ethernet port or a virtual interface.

  1. Enter the global configuration mode by issuing the configure terminal command. device# configure terminal
  2. Enter the interface configuration mode. device(config)# interface ethernet 1/1/2
  3. Add a helper address for the server. device(config-if-1/1/2)# ip helper-address 1 10.95.7.6

    The commands in the example above add a helper address for server 10.95.7.6 to the port. If the port receives a client request for any of the applications that the Layer 3 switch is enabled to forward, the Layer 3 switch forwards the client request to the server.

  4. By default, an IP helper does not forward client broadcast requests to a server within the network. To forward a client broadcast request when the client and server are on the same network, configure an IP helper with the unicast option on the interface connected to the client. device(config-if-1/1/2)# ip helper-address 1 10.10.10.1 unicast

    The previous example configures an IP helper unicast option on unit 1, slot 1, port 2. The IP helper with unicast parameter forwards the client request to the server 10.10.10.1, which is within the network.

Have you ever wondered how DHCP clients get IP addresses from servers not on their own subnet? This lab will discuss and demonstrate the configuration and verification of an IP DHCP helper addresses.

Real World Application & Core Knowledge

So have you ever wondered how a single DHCP server can provide DHCP IP addresses to every PC on the network when the DHCP server is not on the same broadcast domain? After all DHCP request are broadcast request right?

Many people wonder how this works but the answer is quite simple. It’s called an IP Helper address. DHCP IP Helper addresses are IP addresses configured on a routed interface such as a VLAN Interface or a routers Ethernet interface that allows that specific device to act as a “middle man” which forwards BOOTP (Broadcast) DHCP request it receives on an interface to the DHCP server specified by the IP Helper address via unicast.

To configure an IP helper address you’ll use the ip helper-address a.b.c.d in interface configuration mode on the interface that is connected to the broadcast domain in which you wish to provide DHCP IP addresses. For example, a VLAN interface or an Ethernet interface on a router connected to a Cisco switch or segregated by a layer 2 VLAN.

In this lab R1 and R2 are placed separate VLAN’s and you will create DHCP pools for each VLAN on R1 then configure an IP Helper address on SW1’s VLAN20 interface connecting to R2 VLAN to ensure that devices on that Ethernet segment can receive DHCP IP address from the DHCP Server (R1). You will test the DHCP and IP Helper configuration using R2 as a simulated host PC.

Familiarize yourself with the following new command(s);

CommandDescription
ip helper-address a.b.c.d This command is executed in interface configuration mode to enable a Layer 3 interface to receive BOOTP DHCP Request and forward them to a specified DHCP server.

The following logical topology shown below is used in this lab;

What does the command ip helper-address server-ip do?

Lab Prerequisites

  • If you are using GNS3 than load the Free CCNA Workbook GNS3 topology than start devices; R1, R2 and SW1
  • Establish a console session with devices R1, R2 and SW1 than load the initial configurations provided below by copying the config from the textbox and pasting it into the respected routers console.

Lab Objectives

  • On R1 create a new DHCP pool called “LAB_POOL2″ and assign it the following attributes; network 10.116.20.0/24, default-router of 10.116.20.2, domain name TESTLAB.LOCAL, DNS servers 10.116.18.6 & 10.116.18.7
  • On SW1 configure the VLAN20 interface with an IP Helper address that points to 10.116.10.1
  • Verify that R2 can receive a DHCP address from R1 in the 10.116.20.0/24 network.

Lab Instruction

Objective 1. – On R1 create a new DHCP pool called “LAB_POOL2″ and assign it the following attributes; network 10.116.20.0/24, default-router of 10.116.20.2, domain name TESTLAB.LOCAL, DNS servers 10.116.18.6 & 10.116.18.7

R1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. R1(config)#ip dhcp pool LAB_POOL2 R1(dhcp-config)#network 10.116.20.0 255.255.255.0 R1(dhcp-config)#default-router 10.116.20.2 R1(dhcp-config)#domain-name TESTLAB.LOCAL R1(dhcp-config)#dns-server 10.116.18.6 10.116.18.7 R1(dhcp-config)#end R1#

Objective 2. – On SW1 configure the VLAN20 interface with an IP Helper address that points to 10.116.10.1

SW1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. SW1(config)#interface vlan 20 SW1(config-if)#ip helper-address 10.116.10.1 SW1(config-if)#end SW1# %SYS-5-CONFIG_I: Configured from console by console SW1#

Objective 3. – Verify that R2 can receive a DHCP address from R1 in the 10.116.20.0/24 network.

R2#configure terminal Enter configuration commands, one per line. End with CNTL/Z. R2(config)#interface FastEthernet0/0 R2(config-if)#shut R2(config-if)# %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down R2(config-if)#no shut R2(config-if)#end R2# %SYS-5-CONFIG_I: Configured from console by console R2# %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up R2# %DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/0 assigned DHCP address 10.116.20.3, mask 255.255.255.0, hostname R2 R2#ping 10.116.10.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.116.10.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 48/108/164 ms R2#

What does the ip helper

Defines the address of a remote DHCP server or DHCP relay agent. Up to eight addresses can be defined. The DHCP agent forwards DHCP client requests to all defined servers.

What does the command ip helper

What does the ip helper-address (server-ip) command tell the router to do with messages coming in from a DHCP client? 1. Watch for incoming DHCP messages, with destination IP address 255.255. 255.255.

What is an ip helper

ip helper-address address 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.

Do I need ip Helper?

If DHCP clients still exist on the LANs that do not have a DHCP server, then the routers connected to those LANs still need the ip helper-address command. or example, in Figure 18-5, R1 would still need the ip helper-address command on its LAN interface.