Router Installation and Configuration Manual/Configuring DHCP Services

From ImageStream Router Documentation

Jump to: navigation, search


This chapter describes how to configure the ImageStream router to act as a DHCP client or a DHCP relay by using SAND’s dhcp commands in the main WAN interface configuration file.
This chapter covers configuration on the following topics:
  • Network interface as a DHCP client
  • DHCP relay services
  • Router as a DHCP server
Before configuring DHCP services, you must configure your WAN interfaces and make the appropriate cabling connection for your needs. Refer to the hardware installation guide for your ImageStream product for information on making the WAN connection. See the Command Reference for more detailed command descriptions and instructions.
After logging in, the main menu is displayed (your menu may look slightly different):
ISis-Router main menu 
1. Configuration menu 
2. Show interface status 
3. Advanced 
4. Router software management 
5. Backup/Restore 
6. halt/reboot 
0. Log off 
Select the "Configuration menu" by pressing 1 and Enter to configure the router. The next menu should appear (your menu may look slightly different):
Configuration menu 
1. AAA (Password) Configuration 
2. Global configuration 
3. Network interface configuration 
4. Firewall and QOS configuration 
5. Service configuration 
6. Dynamic routing configuration 
7. Save configuration to flash 
0. ISis-Router main menu 
From the "Configuration menu", select the "Network interface configuration" option by pressing 6 and Enter. This will open the ImageStream router's primary configuration file, wan.conf in the default editor. The wan.conf file is also accessible from the command line in the /usr/local/sand directory.

Configuring an Interface as a DHCP Client

Some routers, especially those connected to broadband Internet connections via an Ethernet port, may obtain an IP address from a DHCP server. To change the IP address and netmask of the interface to a dynamically assigned address, modify the ip address command to instruct the router to act as a DHCP client on this interface. The syntax of this DHCP client command is:
ip address dhcp [ client-id   { your-client-id }] 	[ client-name 	{ your-client-name }] 
The client-id and client-name commands are optional. If your DHCP server, or your broadband provider, require a client ID or name, specify either one or both of these optional parameters as necessary.
Using the default configuration below, we have set the Ethernet0 IP address to a dynamic IP address. When the router boots, or when the SAND service is reloaded, the router will make a DHCP request on the Ethernet0 device and wait for a response from the DHCP server. The DHCP client will accept an IP address, netmask, default gateway IP, DNS server addresses, and domain name if supplied by the DHCP server.
 interface Ethernet0 
 description Dynamic IP connection duplex auto 
 speed auto 
 ip address dhcp
The example above uses the device Ethernet0, but the ip address dhcp command is valid on any network interface, including Serial, Tunnel, Bonder, frame relay subinterfaces, ATM subinterfaces and hardware multiplexing subinterfaces.

Configuring DHCP Relay Services

Networks that serve IP addresses from a single, centrally located DHCP server must have devices that relay DHCP address broadcast requests to the central DHCP server. Since DHCP/bootp broadcasts cannot travel over unicast networks natively, ImageStream routers support DHCP relaying. The DHCP relaying client embedded in ImageStream’s Enterprise Linux reformulates the DHCP broadcast request into a special unicast packet and relays this request to a specified DHCP server. The DHCP server replies with a special unicast packet with a DHCP address assignment. The router accepts this packet, recreates the regular DHCP address reply broadcast and relays it to the network where the original request was made.
To enable DHCP relaying on one or more interfaces, add the ip helper-address command to the global configuration section of the router’s main configuration file (wan.conf). The global configuration section normally appears at the bottom of the file after all interface declarations. The placement of the ip helper-address commands in the global section is done by convention for ease of configuration management. The actual placement of the command in the file is not important to the operation of the command.
The syntax of this DHCP relay command is:
ip helper-address { DHCP server IP address } server-device { interface connected to DHCP server } [ interfaces <interface list>   ]   [ agent-id   { agent-id }] 
The interfaces and agent-id commands are optional. The interfaces command allows you to limit DHCP relaying to a specific list of interfaces. If your DHCP server requires an agent ID to identify the requesting network, specify the agent-id optional parameter.
In the configuration below, we will use the ip helper-address command to relay DHCP requests from all interfaces to a DHCP server connected on Ethernet0 at the IP address
 interface Ethernet0 
 description LAN segment #1 
 duplex auto 
 speed auto 
 ip address
interface Ethernet1 
 description LAN segment #2 
 ip address
interface Ethernet2
 description LAN segment #3
 ip address
interface Ethernet3
 description LAN segment - Dallas bridge
 bridge-group 1
 bridge-group 1 spanning-disabled
interface Serial0
 #NOC phone: 800-555-1212 - Our account #58935 interface Serial0 
 description Connection to New York encapsulation hdlc 
 bandwidth 1536000 
 ip address 
interface Serial1 
description Connection to Mexico City encapsulation ppp 
bandwidth 1536000 
ip address
interface Serial2 
 description Connection to Dallas office encapsulation hdlc 
 bridge-group 1 
 bridge-group 1 spanning-disabled
interface bvi1
 ip address
ip helper-address server-device bvi1 
In the example above, any DHCP requests received on Ethernet1, Ethernet2, Serial0 or bvi1 will be relayed to the DHCP server at, using the device bvi1.
Using regular expressions, it is possible to restrict DHCP relaying to only selected interfaces. The regular expression must be comma-delimited with no whitespace, and may use wildcards (‘*’). Using the same WAN configuration, the ip helper-address command below limits DHCP relaying to Ethernet devices only. Serial0 is excluded in this example:
ip helper-address server-device bvi1 interfaces Ethernet*,Serial0
Personal tools
Router software releases