HP 10500 Series Configuration Manual page 222

Hide thumbs Also See for 10500 Series:
Table of Contents

Advertisement

Configure the servers so Device A can obtain a Python script to complete the following configuration
tasks:
Enable the administrator to Telnet to Device A to manage Device A.
Require the administrator to enter the correct username and password at login.
Figure 49 Network diagram
Configuration procedure
1.
Configure the DHCP server:
# Enable DHCP.
<DeviceB> system-view
[DeviceB] dhcp enable
# Configure the address pool 1 to assign IP addresses on subnet 192.168.1.0/24 to clients.
[DeviceB] dhcp server ip-pool 1
[DeviceB-dhcp-pool-1] network 192.168.1.0 24
# Specify the URL of the script file for the clients.
[DeviceB-dhcp-pool-1] bootfile-name http://192.168.1.40/device.py
2.
Configure the HTTP server:
# Create the configuration file device.py on the HTTP server.
#!usr/bin/python
import comware
comware.CLI('system-view ;telnet server enable ;local-user user ;password simple
abcabc ;service-type telnet ;quit ;user-interface vty 0 4 ;authentication-mode
scheme ;user-role network-admin ;quit ;interface gigabitethernet 1/0/1 ;port
link-mode route ;ip address dhcp-alloc ;return')
# Start HTTP service software and enable HTTP service. (Details not shown.)
Verifying the configuration
1.
Power on Device A.
2.
After Device A starts up, display assigned IP addresses on Device B.
<DeviceB> display dhcp server ip-in-use
IP address
192.168.1.2
3.
Telnet to 192.168.1.2 from Device B.
Client identifier/
Hardware address
0030-3030-632e-3239-
3035-2e36-3736-622d-
4574-6830-2f30-2f32
212
Lease expiration
Dec 12 17:41:15 2013
Type
Auto(C)

Advertisement

Table of Contents
loading

Table of Contents