171
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 Switch A.
2. After Switch A starts up, display assigned IP addresses on Device A.
<DeviceA> display dhcp server ip-in-use
IP address Client identifier/ Lease expiration Type
Hardware address
192.168.1.2 0030-3030-632e-3239- Dec 12 17:41:15 2013 Auto(C)
3035-2e36-3736-622d-
4574-6830-2f30-2f32
3. Telnet to 192.168.1.2 from Device A.
<DeviceA> telnet 192.168.1.2
4. Enter the username user and password abcabc as prompted. (Details not shown.)
You are logged in to Switch A.
Automatic IRF setup
Network requirements
As shown in Figure 54, Switch A and Switch B do not have a configuration file.
Configure the servers so the switches can obtain a Python script to complete their respective
configurations and form an IRF fabric.
Figure 54 Network diagram
Device A
DHCP server
HTTP server
IRF
192.168.1.40
GE1/0/1
192.168.1.1/24
Switch A Switch B
MGE0/0/0 MGE0/0/0
GE1/0/2
IRF-port1/2
GE1/0/2
IRF-port2/1